public class Type
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Type(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSubType(Type newSubType) |
void |
addSuperType(java.util.Set<Type> parentTypeCollection) |
void |
addSuperType(Type newSuperType) |
boolean |
equals(java.lang.Object o) |
java.util.List<Type> |
getAllSubTypes() |
java.util.List<Type> |
getAllSubTypesIncl() |
java.util.List<Type> |
getAllSuperTypes() |
java.util.List<Type> |
getAllSuperTypesIncl() |
java.util.List<Type> |
getConcretesHierarchyIncludingType() |
java.util.List<Type> |
getDirectSubTypes() |
java.util.List<Type> |
getDirectSuperTypes() |
static Type |
getGreatestSubType(Type type,
Type type2)
Searches in data type DAG for a greatest sub type of the given two types.
|
java.util.List<Type> |
getInheritanceHierarchyIncludingType() |
java.lang.String |
getName() |
int |
hashCode() |
boolean |
isRootType() |
boolean |
isSubTypeOf(Type typeToCheck)
Given the parameter typeToCheck, this method checks whether typeToCheck is actually a super type of the current object.
|
boolean |
isSuperTypeOf(Type typeToCheck)
Given the parameter typeToCheck, this method checks whether typeToCheck is actually a sub type of the current object.
|
void |
removeSubType(Type removeSubType) |
void |
removeSuperType(Type removeSuperType) |
java.lang.String |
serialize() |
java.lang.String |
toString() |
public java.lang.String getName()
public void addSubType(Type newSubType)
public void removeSubType(Type removeSubType)
public java.util.List<Type> getDirectSubTypes()
public java.util.List<Type> getAllSubTypes()
public java.util.List<Type> getAllSubTypesIncl()
public void addSuperType(Type newSuperType)
public void removeSuperType(Type removeSuperType)
public java.util.List<Type> getDirectSuperTypes()
public boolean isRootType()
public boolean isSuperTypeOf(Type typeToCheck)
typeToCheck - A DataType to check whether it is a sub-type of this DataType.public boolean isSubTypeOf(Type typeToCheck)
typeToCheck - A DataType to check whether it is a super type of this DataTypepublic java.lang.String toString()
toString in class java.lang.Objectpublic void addSuperType(java.util.Set<Type> parentTypeCollection)
public static Type getGreatestSubType(Type type, Type type2)
type - Type to check for sub type relation.type2 - Type to check for sub type relation.public java.util.List<Type> getInheritanceHierarchyIncludingType()
public java.util.List<Type> getConcretesHierarchyIncludingType()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.util.List<Type> getAllSuperTypes()
public java.util.List<Type> getAllSuperTypesIncl()
public java.lang.String serialize()