public abstract class AbstractAttribute extends java.lang.Object implements IAttribute
IAttribute abstract implementation
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
Attribute name
|
Constructor and Description |
---|
AbstractAttribute()
Empty constructor
|
AbstractAttribute(java.lang.String name)
Constructor that sets attribute name
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Access to the attribute name
*
|
abstract AttributeType |
getType()
Access to the attribute type
|
abstract boolean |
isValid(double internalValue)
Check if this internal attribute value is valid
|
abstract boolean |
isValid(java.lang.Object externalValue)
Check if this external attribute value is valid
|
abstract double |
parse(java.lang.String externalValue)
Parse an external value to obtain the internal value of the
Attribute
|
void |
setName(java.lang.String name)
Set attribute name
|
abstract java.lang.String |
show(double internalValue)
Show an String which represents a given real value
|
public AbstractAttribute()
Empty constructor
public AbstractAttribute(java.lang.String name)
Constructor that sets attribute name
name
- Attribute namepublic final void setName(java.lang.String name)
Set attribute name
name
- New attribute namepublic java.lang.String getName()
Access to the attribute name
*getName
in interface IAttribute
public abstract AttributeType getType()
Access to the attribute type
getType
in interface IAttribute
public abstract boolean isValid(double internalValue)
Check if this internal attribute value is valid
isValid
in interface IAttribute
internalValue
- value to checkpublic abstract boolean isValid(java.lang.Object externalValue)
Check if this external attribute value is valid
isValid
in interface IAttribute
externalValue
- Value to checkpublic abstract double parse(java.lang.String externalValue)
Parse an external value to obtain the internal value of the Attribute
parse
in interface IAttribute
externalValue
- external value to parsepublic abstract java.lang.String show(double internalValue)
Show an String which represents a given real value
show
in interface IAttribute
internalValue
- internal value asked.