public class Property extends Object
| Constructor and Description |
|---|
Property(Object value,
byte dataTypeId)
Create a new Property with a value and data type.
|
Property(Object value,
byte dataTypeId,
boolean isCollectionOfValues) |
Property(Object value,
char dataTypeId)
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.
|
Set |
asSet()
Gets a set of possible values for this property.
|
String |
asString()
Get the value of the property as a String.
|
boolean |
equals(Object obj) |
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() |
String |
toString()
Get the value of the property as a String.
|
Object |
value()
Get the value Object.
|
public Property(Object value, byte dataTypeId)
value - The value to storedataTypeId - The type of the value to storepublic Property(Object value, char dataTypeId)
value - The value to storedataTypeId - The type of the value to storepublic Property(Object value, byte dataTypeId, boolean isCollectionOfValues)
value - The value to storedataTypeId - The type of the value to storeisCollectionOfValues - Indicates if the Property will contain a single value or multiple valuespublic byte getDataTypeId()
public String getDataType()
public Object value()
public 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 Set asSet()
public String toString()
Copyright © 2021 DeviceAtlas Limited. All rights reserved.