Class CollectionConverter.Set
java.lang.Object
org.apache.sis.internal.converter.ClassPair<S,T>
org.apache.sis.internal.converter.SystemConverter<Collection<?>,T>
org.apache.sis.internal.converter.CollectionConverter<Set<?>>
org.apache.sis.internal.converter.CollectionConverter.Set
- All Implemented Interfaces:
Serializable
,Function<Collection<?>,
,Set<?>> ObjectConverter<Collection<?>,
Set<?>>
- Enclosing class:
- CollectionConverter<T>
Converter from
Collection
to Set
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.converter.CollectionConverter
CollectionConverter.List, CollectionConverter.Set
-
Field Summary
FieldsFields inherited from class org.apache.sis.internal.converter.ClassPair
sourceClass, targetClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<?>
apply
(Collection<?> source) Converts the given object from the source type S to the target type T.Methods inherited from class org.apache.sis.internal.converter.CollectionConverter
properties
Methods inherited from class org.apache.sis.internal.converter.SystemConverter
bijective, equals, formatErrorMessage, getSourceClass, getTargetClass, inverse, readResolve, unique
Methods inherited from class org.apache.sis.internal.converter.ClassPair
cast, hashCode, parentSource, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Set
public Set()
-
-
Method Details
-
apply
Description copied from interface:ObjectConverter
Converts the given object from the source type S to the target type T. If the given object cannot be converted, then this method may either returnsnull
or throws an exception, at implementation choice (except for injective functions, which must throw an exception - see the class Javadoc for more discussion about function properties).Example: in Apache SIS implementation, converters fromString
toNumber
distinguish two kinds of unconvertible objects:- Null or empty source string result in a
null
value to be returned. - All other kind of unparsable strings results in an exception to be thrown.
""
value is unconvertible but nevertheless considered as part of the converter domain, and is mapped to "no number". All other unparsable strings are considered outside the converter domain.- Parameters:
source
- the object to convert, ornull
.- Returns:
- the converted object, or
null
.
- Null or empty source string result in a
-