Class DateConverter.Long
java.lang.Object
org.apache.sis.internal.converter.ClassPair<Date,Long>
org.apache.sis.internal.converter.SystemConverter<Date,Long>
org.apache.sis.internal.converter.DateConverter<Long>
org.apache.sis.internal.converter.DateConverter.Long
- All Implemented Interfaces:
Serializable
,Function<Date,
,Long> ObjectConverter<Date,
Long>
- Enclosing class:
DateConverter<T>
Converter from
Date
to Long
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.converter.DateConverter
DateConverter.Long, DateConverter.SQL, DateConverter.Timestamp
-
Field Summary
FieldsFields inherited from class org.apache.sis.internal.converter.DateConverter
inverse
Fields inherited from class org.apache.sis.internal.converter.ClassPair
sourceClass, targetClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the given object from the source type S to the target type T.Returns the function properties.Methods inherited from class org.apache.sis.internal.converter.DateConverter
inverse
Methods inherited from class org.apache.sis.internal.converter.SystemConverter
bijective, equals, formatErrorMessage, getSourceClass, getTargetClass, 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
-
Long
public Long()
-
-
Method Details
-
properties
Description copied from class:DateConverter
Returns the function properties.- Specified by:
properties
in interfaceObjectConverter<Date,
Long> - Overrides:
properties
in classDateConverter<Long>
- Returns:
- the manners in which source values are mapped to target values. May be an empty set, but never null.
-
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
-