PropertyValue
Leave feedback
On this page
Inheritance: java.lang.Object
public class PropertyValue
Represents a property value.
| 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) | |
| PropertyValue(Object value) | Initializes a new instance of the PropertyValue class with a generic object value. |
| 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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
public PropertyValue(PropertyValue value)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | PropertyValue |
public PropertyValue(UUID value)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.UUID |
public PropertyValue(Object value)
Initializes a new instance of the PropertyValue class with a generic object value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Object | An object value. |
public final MetadataPropertyType getType()
Gets the MetadataPropertyType .
Returns: MetadataPropertyType - The type of the property.
public final Object getRawValue()
Gets the raw value.
Returns: java.lang.Object - The raw value.
public static PropertyValue getEmpty()
Returns: PropertyValue
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.
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.
public String toString()
Returns a string that represents the property value.
Returns: java.lang.String - A string that represents the property value.
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. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.