Class DateConverter.Timestamp
java.lang.Object
org.apache.sis.internal.converter.ClassPair<S,T>
org.apache.sis.internal.converter.SystemConverter<Date,T>
org.apache.sis.internal.converter.DateConverter<Timestamp>
org.apache.sis.internal.converter.DateConverter.Timestamp
- All Implemented Interfaces:
Serializable
,Function<Date,
,Timestamp> ObjectConverter<Date,
Timestamp>
- Enclosing class:
- DateConverter<T>
From
Date
to SQL Timestamp
.
The inverse of this converter is the identity conversion.- 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
Methods inherited from class org.apache.sis.internal.converter.DateConverter
inverse, properties
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
-
Timestamp
public Timestamp()
-
-
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
-