|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.data.type.SimpleTypeInformation<T>
T
- Java type we represent.public class SimpleTypeInformation<T>
Class wrapping a particular data type.
Field Summary | |
---|---|
private Class<? super T> |
cls
The restriction class we represent. |
private String |
label
Type label |
Constructor Summary | |
---|---|
SimpleTypeInformation(Class<? super T> cls)
Constructor. |
|
SimpleTypeInformation(Class<? super T> cls,
String label)
Constructor. |
Method Summary | |
---|---|
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. |
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Class<? super T> cls
private String label
Constructor Detail |
---|
public SimpleTypeInformation(Class<? super T> cls)
cls
- restriction classpublic SimpleTypeInformation(Class<? super T> cls, String label)
cls
- restriction classlabel
- type labelMethod Detail |
---|
public final Class<? super T> getRestrictionClass()
public boolean isAssignableFromType(TypeInformation type)
TypeInformation
isAssignableFromType
in interface TypeInformation
type
- Other type
public boolean isAssignableFrom(Object other)
TypeInformation
isAssignableFrom
in interface TypeInformation
other
- Other object
public T cast(Object other)
other
- Object to cast.
public String toString()
toString
in class Object
public String getLabel()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |