Class ArrayTypePropertyValue
java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.search.PropertyValue
org.odpi.openmetadata.frameworks.governanceaction.search.ArrayTypePropertyValue
ArrayTypePropertyValue stores the values of an array within an entity or relationship properties.
The elements of the array are stored in an ElementProperties map where the property name is set to the element
number and the property value is set to the value of the element in the array.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor sets the array to empty.ArrayTypePropertyValue(ArrayTypePropertyValue template) Copy/clone constructor set up the array using the supplied template. -
Method Summary
Modifier and TypeMethodDescriptionDelegate the process of cloning to the subclass.booleanValidate that an object is equal depending on their stored values.intReturn the number of elements in the array.Return a copy of the array elements.inthashCode()Return a hash code based on the property valuesvoidsetArrayCount(int arrayCount) Set up the number of elements in the array.voidsetArrayValue(int elementNumber, PropertyValue propertyValue) Add or update an element in the array.voidsetArrayValues(ElementProperties arrayValues) Set up the array elements in one call.toString()Standard toString method.Return the object version of the value - used for comparisons.Return the string version of the value - used for error logging.Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.search.PropertyValue
getTypeName, setTypeName
-
Constructor Details
-
ArrayTypePropertyValue
public ArrayTypePropertyValue()Default constructor sets the array to empty. -
ArrayTypePropertyValue
Copy/clone constructor set up the array using the supplied template.- Parameters:
template- ArrayTypePropertyValue
-
-
Method Details
-
cloneFromSubclass
Delegate the process of cloning to the subclass.- Specified by:
cloneFromSubclassin classPropertyValue- Returns:
- subclass of PropertyValue
-
valueAsString
Return the string version of the value - used for error logging.- Specified by:
valueAsStringin classPropertyValue- Returns:
- string value
-
valueAsObject
Return the object version of the value - used for comparisons.- Specified by:
valueAsObjectin classPropertyValue- Returns:
- object value
-
getArrayCount
public int getArrayCount()Return the number of elements in the array.- Returns:
- int array size
-
setArrayCount
public void setArrayCount(int arrayCount) Set up the number of elements in the array.- Parameters:
arrayCount- int array size
-
getArrayValues
Return a copy of the array elements.- Returns:
- ElementProperties containing the array elements
-
setArrayValue
Add or update an element in the array.- Parameters:
elementNumber- index number of the element in the arraypropertyValue- value to store
-
setArrayValues
Set up the array elements in one call.- Parameters:
arrayValues- ElementProperties containing the array elements
-
toString
Standard toString method.- Overrides:
toStringin classPropertyValue- Returns:
- JSON style description of variables.
-
equals
Validate that an object is equal depending on their stored values.- Overrides:
equalsin classPropertyValue- Parameters:
objectToCompare- object- Returns:
- boolean result
-
hashCode
public int hashCode()Return a hash code based on the property values- Overrides:
hashCodein classPropertyValue- Returns:
- int hash code
-