Class DomainValues
- All Implemented Interfaces:
IConvertable
,IListValue
,IValue
,Serializable
Instances start out empty. New values can be added by using the
addDomainValue(IPrimitiveValue, IMultilingualText, String...)
method.
Instances of this class may be returned from IDomainValuesFactory
implementations. It may also be
sub-classed. Please note that the addValue(IPrimitiveValue)
and addAll(IPrimitiveValue[])
methods
always throw an exception. The addDomainValue(IPrimitiveValue, IMultilingualText, String...)
should be used
instead.
- Since:
- 11.0
- Author:
- Petru Galanton
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addAll
(IPrimitiveValue[] values) Always throws an exception.final void
addDomainValue
(boolean value, IMultilingualText text, String... presentationStyles) Convenience method for adding a BoleanValue.final void
addDomainValue
(double value, IMultilingualText text, String... presentationStyles) Convenience method for adding a NumberValue.final void
addDomainValue
(long value, IMultilingualText text, String... presentationStyles) Convenience method for adding an IntegerValue.final void
addDomainValue
(IPrimitiveValue value, IMultilingualText text, String... presentationStyles) Adds a value to the set of values of the external domain.final void
addDomainValue
(String value, IMultilingualText text, String... presentationStyles) Convenience method for adding a StringValue.final boolean
addValue
(IPrimitiveValue primitiveValue) Always throws an exception.boolean
getDomainValueAt
(int index) Returns the domain value definition at the specified zero-based index.Returns all the domain value definitions.int
hashCode()
Methods inherited from class com.aquima.interactions.foundation.types.ListValue
clearValues, contains, duplicate, getDataType, getInternalValues, getSortedValues, getValue, getValueAt, getValueCount, getValues, insertValue, isEmpty, isRangeValue, isSingleValue, isUniqueSet, isUnknown, removeValue, toListValue, toRangeValue, toSingleValue, toString, unknownFor
Methods inherited from class com.aquima.interactions.foundation.convert.Convertable
booleanValue, dateValue, doubleValue, integerValue, longValue, stringValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.convert.IConvertable
booleanValue, dateValue, doubleValue, integerValue, longValue, stringValue
-
Constructor Details
-
DomainValues
-
-
Method Details
-
addDomainValue
public final void addDomainValue(IPrimitiveValue value, IMultilingualText text, String... presentationStyles) Adds a value to the set of values of the external domain. This method ensures that the type name of the value matches the domain name.- Parameters:
value
- the value to be addedtext
- the display valuepresentationStyles
- the optional presentation styles of the value
-
addDomainValue
public final void addDomainValue(String value, IMultilingualText text, String... presentationStyles) Convenience method for adding a StringValue.- Parameters:
value
- the valuetext
- the display valuepresentationStyles
- the optional presentation styles
-
addDomainValue
Convenience method for adding an IntegerValue.- Parameters:
value
- the valuetext
- the display valuepresentationStyles
- the optional presentation styles
-
addDomainValue
public final void addDomainValue(double value, IMultilingualText text, String... presentationStyles) Convenience method for adding a NumberValue. For adding Currency or Percentage, use the generic variant of this method.- Parameters:
value
- the valuetext
- the display valuepresentationStyles
- the optional presentation styles
-
addDomainValue
public final void addDomainValue(boolean value, IMultilingualText text, String... presentationStyles) Convenience method for adding a BoleanValue.- Parameters:
value
- the valuetext
- the display valuepresentationStyles
- the optional presentation styles
-
addValue
Always throws an exception. UseaddDomainValue(IPrimitiveValue, IMultilingualText, String...)
instead. -
addAll
Always throws an exception. UseaddDomainValue(IPrimitiveValue, IMultilingualText, String...)
instead. -
getDomainValueAt
Returns the domain value definition at the specified zero-based index. The value of the returned domain value definition is the same as the value returned byListValue.getValueAt(int)
at the same index.This method should be used over
ListValue.getValueAt(int)
when additional information about the domain value is needed (such as presentation styles).The total number of domain values may be obtained using
ListValue.getValueCount()
.- Parameters:
index
- the index of the domain value definition- Returns:
- the domain value definition
-
getDomainValues
Returns all the domain value definitions. The values in each domain value definition at index n is the same as the value at index n in the array returned byListValue.getValues()
.This method should be used over
ListValue.getValues()
when additional information about the domain values is needed (such as presentation styles).- Returns:
- all domain values
-
hashCode
public int hashCode() -
equals
-