|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tridas.io.defaults.AbstractDefaultValue<E>
public abstract class AbstractDefaultValue<E>
Constructor Summary | |
---|---|
AbstractDefaultValue()
|
|
AbstractDefaultValue(int argMaxLength,
int argMinLength)
|
Method Summary | |
---|---|
Object |
clone()
|
Enum<?> |
getKey()
The enum key that this object is mapped from |
int |
getMaxLength()
The maximum string length |
int |
getMinLength()
The minimum string length |
IMetadataFieldSet |
getParent()
|
String |
getStringValue()
Gets the string representation of the value. |
abstract E |
getValue()
Gets the value. |
boolean |
isOverriding()
If the value in this object is overriding. |
boolean |
isPadRight()
If we pad the string from the right if it's too short. |
protected void |
setKey(Enum<?> argKey)
|
void |
setMaxLength(int argMaxLength)
Sets the maximum string length. |
void |
setMinLength(int argMinLength)
Sets the minimum string length. |
void |
setOverriding(boolean argOverriding)
If the value in this object is overriding. |
boolean |
setOverridingValue(E argValue)
Sets the value that will override other calls to setValue(Object) . |
void |
setPadRight(boolean padRight)
Sets if we pad from the right if the string is too short. |
protected void |
setParent(IMetadataFieldSet argParent)
|
boolean |
setValue(E argValue)
Sets the value of this field. |
protected abstract boolean |
validateAndSetValue(E argValue)
Validate and set the value. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDefaultValue()
public AbstractDefaultValue(int argMaxLength, int argMinLength)
argMaxLength
- maximum length of returned string. -1 disablesargMinLength
- minimum length of returned string. -1 disablesMethod Detail |
---|
protected void setKey(Enum<?> argKey)
public Enum<?> getKey()
protected void setParent(IMetadataFieldSet argParent)
public IMetadataFieldSet getParent()
public boolean setValue(E argValue)
argValue
-
setOverridingValue(Object)
and
setOverriding(boolean)
).protected abstract boolean validateAndSetValue(E argValue)
argValue
- the value, can be null.
public boolean setOverridingValue(E argValue)
setValue(Object)
. To
turn overriding off call setOverriding(boolean)
. if the value isn't valid,
then overriding is not turned on.
argValue
-
public abstract E getValue()
public String getStringValue()
setMinLength(int)
is set,
then the string will be padded. If getValue()
is null, an empty string is
returned (if minLength is set, then it is padded as well).
public boolean isOverriding()
setOverridingValue(Object)
do not change the value.
Default of false.
public void setOverriding(boolean argOverriding)
setOverridingValue(Object)
do not change the value.
Default of false.
argOverriding
- public void setMaxLength(int argMaxLength)
maxLength
- the maxLength to setpublic int getMaxLength()
public void setMinLength(int argMinLength)
minLength
- the minLength to setpublic int getMinLength()
public void setPadRight(boolean padRight)
padRight
- the padRight to setpublic boolean isPadRight()
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |