Interface IPrimitiveValue
- All Superinterfaces:
Comparable<Object>
,IConvertable
,IValue
,Serializable
- All Known Subinterfaces:
ICompoundValue
,IRangeValue
,ISingleValue
- All Known Implementing Classes:
AbstractValue
,AnyValue
,AttributeBooleanValue
,AttributeCurrency
,AttributeDateTimeValue
,AttributeDateValue
,AttributeEntityValue
,AttributeInfiniteValue
,AttributeIntegerValue
,AttributeNumberValue
,AttributePercentage
,AttributeRangeValue
,AttributeStringValue
,BinaryValue
,BooleanValue
,Currency
,DateTimeValue
,DateValue
,EntityContextDelegate
,EntityValue
,ForeachObject
,InfiniteValue
,InstanceReferrer
,IntegerValue
,NumberValue
,Percentage
,RangeValue
,StringValue
,ValueReference
The primitive value interface may be implemented by objects that represent a single continuous range or value. The
most important addition of this interface is that it enforces primitive values to be comparable to other values,
which allows lists to order them.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionforType
(String typeName, IMultilingualText displayValue) This method adds the type and display information to the value, and returns the value with this added information.getDisplayValue
(String languageCode, IValueFormatter formatter) This method returns a string that can be used as display value for the specified language.This method will return the (optional) type name of the value.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.aquima.interactions.foundation.convert.IConvertable
booleanValue, dateValue, doubleValue, getValue, integerValue, longValue, stringValue
Methods inherited from interface com.aquima.interactions.foundation.IValue
contains, duplicate, getDataType, isRangeValue, isSingleValue, isUnknown, toListValue, toRangeValue, toSingleValue
-
Method Details
-
getTypeName
String getTypeName()This method will return the (optional) type name of the value. The type name is available when the value belongs to a typed set like a domain or entity. In case the value is part of a domain, the type name will contain the name of the domain the value belongs to.- Returns:
- The type of the value.
-
getDisplayValue
This method returns a string that can be used as display value for the specified language.- Parameters:
languageCode
- the code of the languageformatter
- optional formatter- Returns:
- A string containing the display value for the specified language.
-
forType
This method adds the type and display information to the value, and returns the value with this added information. The method will not change the state of the value the method is invoked on, but it will return a copy of the current value with the added information.- Parameters:
typeName
- The type of the value.displayValue
- Multilingual text containing display values.- Returns:
- The value with the added information.
-