T
- Java type we represent.public class SimpleTypeInformation<T> extends Object implements TypeInformation
Modifier and Type | Field and Description |
---|---|
private Class<? super T> |
cls
The restriction class we represent.
|
private String |
label
Type label.
|
private ByteBufferSerializer<? super T> |
serializer
Type serializer.
|
Constructor and Description |
---|
SimpleTypeInformation(Class<? super T> cls)
Constructor.
|
SimpleTypeInformation(Class<? super T> cls,
ByteBufferSerializer<? super T> serializer)
Constructor.
|
SimpleTypeInformation(Class<? super T> cls,
String label)
Constructor.
|
SimpleTypeInformation(Class<? super T> cls,
String label,
ByteBufferSerializer<? super T> serializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
cast(Object other)
Cast the object to type T (actually to the given restriction class!).
|
String |
getLabel()
Get the type label.
|
Class<? super T> |
getRestrictionClass()
Get the raw restriction class.
|
ByteBufferSerializer<? super T> |
getSerializer()
Get the serializer for this type.
|
boolean |
isAssignableFrom(Object other)
Test whether this type is assignable from a given object instance.
|
boolean |
isAssignableFromType(TypeInformation type)
Test whether this type is assignable from another type.
|
void |
setSerializer(ByteBufferSerializer<? super T> serializer)
Set the serializer for this type.
|
String |
toString() |
private String label
private ByteBufferSerializer<? super T> serializer
public SimpleTypeInformation(Class<? super T> cls)
cls
- restriction classpublic SimpleTypeInformation(Class<? super T> cls, String label)
cls
- restriction classlabel
- type labelpublic SimpleTypeInformation(Class<? super T> cls, ByteBufferSerializer<? super T> serializer)
cls
- restriction classserializer
- Serializerpublic SimpleTypeInformation(Class<? super T> cls, String label, ByteBufferSerializer<? super T> serializer)
cls
- restriction classlabel
- type labelserializer
- Serializerpublic final Class<? super T> getRestrictionClass()
public boolean isAssignableFromType(TypeInformation type)
TypeInformation
isAssignableFromType
in interface TypeInformation
type
- Other typepublic boolean isAssignableFrom(Object other)
TypeInformation
isAssignableFrom
in interface TypeInformation
other
- Other objectpublic T cast(Object other)
other
- Object to cast.public String getLabel()
public ByteBufferSerializer<? super T> getSerializer()
public void setSerializer(ByteBufferSerializer<? super T> serializer)
serializer
- Serializer to useCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.