public class Property
extends java.lang.Object
| Constructor and Description |
|---|
Property(java.lang.Object value,
byte dataTypeId)
Create a new Property with a value and data type.
|
Property(java.lang.Object value,
byte dataTypeId,
boolean isCollectionOfValues)
Create a new Property with a value and data type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Get the value of the property as a boolean.
|
int |
asInteger()
Get the value of the property as an int.
|
java.util.Set |
asSet()
Gets a set of possible values for this property.
|
java.lang.String |
asString()
Get the value of the property as a String.
|
boolean |
equals(java.lang.Object obj)
Check if another object is equal to this object.
|
java.lang.String |
getDataType()
Get the data type name for values associated with this Property
|
byte |
getDataTypeId()
Get the data type ID for values associated with this Property
|
int |
hashCode() |
java.lang.String |
toString()
Get the value of the property as a String.
|
java.lang.Object |
value()
Get the value Object.
|
public Property(java.lang.Object value,
byte dataTypeId)
value - The value to storedataTypeId - The type of the value to store. Data typess are defined in class DataType.public Property(java.lang.Object value,
byte dataTypeId,
boolean isCollectionOfValues)
value - The value to storedataTypeId - The type of the value to store. Data typess are defined in class DataType.isCollectionOfValues - Indicates if the Property will contain a single value or multiple valuespublic byte getDataTypeId()
public java.lang.String getDataType()
public java.lang.Object value()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String asString()
public boolean asBoolean()
throws IncorrectPropertyTypeException
IncorrectPropertyTypeException - Thrown if the type of the value is not a DataType.BOOLEANpublic int asInteger()
throws IncorrectPropertyTypeException
IncorrectPropertyTypeException - Thrown if the type of the value is not compatible with a DataType.INTEGERpublic java.util.Set asSet()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - object to be compared againstpublic int hashCode()
hashCode in class java.lang.Object