Package net.vleo.timel.type
Class Type<T>
- java.lang.Object
-
- net.vleo.timel.type.Type<T>
-
- Type Parameters:
T
- Expected payload Java type
- Direct Known Subclasses:
BigDecimalType
,BooleanType
,DoubleType
,FloatType
,FunctionPrototype.NilType
,IntegerType
,IntervalType
,StringType
,TemplateType
,ZeroType
public abstract class Type<T> extends Object
Superclass to define a TimEL type.Types can be either regular, so that each two instances are equal, or a template, that is a parametrized type.
- Author:
- Andrea Leofreddi
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Type()
protected
Type(Collection a)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
net.vleo.timel.impl.downscaler.Downscaler<?>
getDownscaler()
Retrieve theDownscaler
for this type.String
getName()
Returns the type name as shown to the user.List<Object>
getParameters()
net.vleo.timel.impl.upscaler.Upscaler<?>
getUpscaler()
Retrieve anUpscaler
for this type.int
hashCode()
boolean
isConcrete()
boolean
isSpecializedTemplate()
boolean
isUnboundTemplate()
Type<T>
specialize(Object... parameters)
Type<T>
template()
String
toString()
-
-
-
Constructor Detail
-
Type
protected Type(Collection a)
-
Type
protected Type()
-
-
Method Detail
-
isUnboundTemplate
public boolean isUnboundTemplate()
- Returns:
- True iff this type is a non-specialized template
-
isSpecializedTemplate
public boolean isSpecializedTemplate()
- Returns:
- True iff this type is a specialized template
-
isConcrete
public boolean isConcrete()
- Returns:
- True iff this type is a concrete one, that is either a specialized template or a non-template.
-
template
public Type<T> template()
- Returns:
- The unbound template type for a specialized template, or itself for a non-template type.
-
getUpscaler
public net.vleo.timel.impl.upscaler.Upscaler<?> getUpscaler()
Retrieve anUpscaler
for this type.- Returns:
- The type upscaler
-
getDownscaler
public net.vleo.timel.impl.downscaler.Downscaler<?> getDownscaler()
Retrieve theDownscaler
for this type.- Returns:
- The type downscaler
-
getName
public String getName()
Returns the type name as shown to the user.- Returns:
- Type name
-
-