T - The type for the element to serialize and comparepublic abstract class AbstractElementSerializer<T> extends java.lang.Object implements ElementSerializer<T>
| Modifier and Type | Field and Description |
|---|---|
private java.util.Comparator<T> |
comparator
The associated comparator
|
private java.lang.Class<?> |
type
The type which is being serialized
|
| Constructor and Description |
|---|
AbstractElementSerializer(java.util.Comparator<T> comparator)
Create a new instance of Serializer
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T type1,
T type2)
Returns the comparison of two types.
|
java.util.Comparator<T> |
getComparator() |
java.lang.Class<?> |
getType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeserialize, deserialize, fromBytes, fromBytes, serializeprivate final java.util.Comparator<T> comparator
private java.lang.Class<?> type
public AbstractElementSerializer(java.util.Comparator<T> comparator)
public int compare(T type1, T type2)
compare in interface ElementSerializer<T>type1 - The first type to comparetype2 - The second type to comparepublic java.util.Comparator<T> getComparator()
getComparator in interface ElementSerializer<T>public java.lang.Class<?> getType()
getType in interface ElementSerializer<T>