PropertyValue
Inheritance: java.lang.Object
public class PropertyValue
Represents a property value.
Constructors
Constructor | Description |
---|---|
PropertyValue(int value) | Initializes a new instance of the PropertyValue class with an integer value. |
PropertyValue(long value) | Initializes a new instance of the PropertyValue class with a long value. |
PropertyValue(boolean value) | Initializes a new instance of the PropertyValue class with a boolean value. |
PropertyValue(double value) | Initializes a new instance of the PropertyValue class with a double value. |
PropertyValue(String value) | Initializes a new instance of the PropertyValue class with a string value. |
PropertyValue(Date value) | Initializes a new instance of the PropertyValue class with a DateTime value. |
PropertyValue(String[] values) | Initializes a new instance of the PropertyValue class with a string array. |
PropertyValue(byte[] values) | Initializes a new instance of the PropertyValue class with a byte array. |
PropertyValue(double[] values) | Initializes a new instance of the PropertyValue class with an array of double values. |
PropertyValue(int[] values) | Initializes a new instance of the PropertyValue class with an array of integer values. |
PropertyValue(long[] values) | Initializes a new instance of the PropertyValue class with an array of long values. |
PropertyValue(PropertyValue[] values) | Initializes a new instance of the PropertyValue class with an array of metadata property values. |
PropertyValue(PropertyValue value) | |
PropertyValue(UUID value) |
Methods
Method | Description |
---|---|
getType() | Gets the MetadataPropertyType . |
getRawValue() | Gets the raw value. |
getEmpty() | |
Converts the property value to an array of the specified type. | |
Converts the property value to a reference type. | |
toString() | Returns a string that represents the property value. |
acceptValue(ValueAcceptor valueAcceptor) | Extracts the property value using a custom ValueAcceptor. |
PropertyValue(int value)
public PropertyValue(int value)
Initializes a new instance of the PropertyValue class with an integer value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | An int value. |
PropertyValue(long value)
public PropertyValue(long value)
Initializes a new instance of the PropertyValue class with a long value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | long | A long value. |
PropertyValue(boolean value)
public PropertyValue(boolean value)
Initializes a new instance of the PropertyValue class with a boolean value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | A bool value. |
PropertyValue(double value)
public PropertyValue(double value)
Initializes a new instance of the PropertyValue class with a double value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | A double value. |
PropertyValue(String value)
public PropertyValue(String value)
Initializes a new instance of the PropertyValue class with a string value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | A string value. |
PropertyValue(Date value)
public PropertyValue(Date value)
Initializes a new instance of the PropertyValue class with a DateTime value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date | A DateTime value. |
PropertyValue(String[] values)
public PropertyValue(String[] values)
Initializes a new instance of the PropertyValue class with a string array.
Parameters:
Parameter | Type | Description |
---|---|---|
values | java.lang.String[] | A string array. |
PropertyValue(byte[] values)
public PropertyValue(byte[] values)
Initializes a new instance of the PropertyValue class with a byte array.
Parameters:
Parameter | Type | Description |
---|---|---|
values | byte[] | A byte array. |
PropertyValue(double[] values)
public PropertyValue(double[] values)
Initializes a new instance of the PropertyValue class with an array of double values.
Parameters:
Parameter | Type | Description |
---|---|---|
values | double[] | An array of double values. |
PropertyValue(int[] values)
public PropertyValue(int[] values)
Initializes a new instance of the PropertyValue class with an array of integer values.
Parameters:
Parameter | Type | Description |
---|---|---|
values | int[] | An array of integer values. |
PropertyValue(long[] values)
public PropertyValue(long[] values)
Initializes a new instance of the PropertyValue class with an array of long values.
Parameters:
Parameter | Type | Description |
---|---|---|
values | long[] | An array of long values. |
PropertyValue(PropertyValue[] values)
public PropertyValue(PropertyValue[] values)
Initializes a new instance of the PropertyValue class with an array of metadata property values.
Parameters:
Parameter | Type | Description |
---|---|---|
values | PropertyValue[] | An array of metadata property values. |
PropertyValue(PropertyValue value)
public PropertyValue(PropertyValue value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | PropertyValue |
PropertyValue(UUID value)
public PropertyValue(UUID value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.UUID |
getType()
public final MetadataPropertyType getType()
Gets the MetadataPropertyType .
Returns: MetadataPropertyType - The type of the property.
getRawValue()
public final Object getRawValue()
Gets the raw value.
Returns: java.lang.Object - The raw value.
getEmpty()
public static PropertyValue getEmpty()
Returns: PropertyValue
toArray(Class elementType)
public final TElement[] <TElement>toArray(Class<TElement> elementType)
Converts the property value to an array of the specified type.
Parameters:
Parameter | Type | Description |
---|---|---|
elementType | java.lang.Class |
Returns: TElement[] - The value represented as an array of the specified type or null if there is no such conversion.
TElement : The type of an element.
toClass(Class type)
public final T <T>toClass(Class<T> type)
Converts the property value to a reference type.
Parameters:
Parameter | Type | Description |
---|---|---|
type | java.lang.Class |
Returns: T - The converted value or null if there is no such conversion.
T : The exact type to convert to.
toString()
public String toString()
Returns a string that represents the property value.
Returns: java.lang.String - A string that represents the property value.
acceptValue(ValueAcceptor valueAcceptor)
public void acceptValue(ValueAcceptor valueAcceptor)
Extracts the property value using a custom ValueAcceptor.
Parameters:
Parameter | Type | Description |
---|---|---|
valueAcceptor | ValueAcceptor | An acceptor that extracts the value. |