de.lmu.ifi.dbs.elki.data.type
Class AlternativeTypeInformation
java.lang.Object
de.lmu.ifi.dbs.elki.data.type.AlternativeTypeInformation
- All Implemented Interfaces:
- TypeInformation
public class AlternativeTypeInformation
- extends Object
- implements TypeInformation
Class that combines multiple type restrictions into one using the "or"
operator.
restrictions
private final TypeInformation[] restrictions
- The wrapped type restrictions
AlternativeTypeInformation
public AlternativeTypeInformation(TypeInformation... restrictions)
- Constructor.
- Parameters:
restrictions
-
isAssignableFromType
public boolean isAssignableFromType(TypeInformation type)
- Description copied from interface:
TypeInformation
- Test whether this type is assignable from another type.
- Specified by:
isAssignableFromType
in interface TypeInformation
- Parameters:
type
- Other type
- Returns:
- true when the other type is accepted as subtype.
isAssignableFrom
public boolean isAssignableFrom(Object other)
- Description copied from interface:
TypeInformation
- Test whether this type is assignable from a given object instance.
- Specified by:
isAssignableFrom
in interface TypeInformation
- Parameters:
other
- Other object
- Returns:
- true when the other type is an acceptable instance.
toString
public String toString()
- Overrides:
toString
in class Object