public class CompositeConverter extends Object implements TypeConverter
CompositeValue
s for the purpose of querying and
storing.
A composite converter may be marked as transient
if at
least one of its component converters is resolved to NULL_CONVERTER
. That null converter set for a
certain component indicates that there are only null
values present
in the index for the corresponding attribute and therefore the actual
attribute type is not resolved yet.
Constructor and Description |
---|
CompositeConverter(TypeConverter[] converters)
Constructs a new composite converter from the given component converters.
|
Modifier and Type | Method and Description |
---|---|
Comparable |
convert(Comparable value)
Compares a
Comparable typed value to another one. |
TypeConverter |
getComponentConverter(int component) |
boolean |
isTransient() |
public CompositeConverter(TypeConverter[] converters)
For performance reasons, the ownership of the passed converters array is transferred to the new composite converter instance.
converters
- the component converters.public boolean isTransient()
true
if this composite converter instance contains
unresolved component converters, false
if all component
converters are resolved.public TypeConverter getComponentConverter(int component)
public Comparable convert(Comparable value)
TypeConverter
Comparable
typed value to another one.
Since TypeConverters are not statically typed itself the developer
needs to take care of correct usage of input and output types.convert
in interface TypeConverter
value
- the value to be convertedCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.