Package uk.ac.starlink.ttools.jel
Class FixedConstant
- java.lang.Object
-
- uk.ac.starlink.ttools.jel.FixedConstant
-
-
Constructor Summary
Constructors Constructor Description FixedConstant(java.lang.Object value)
Constructs a constant with a given value.FixedConstant(java.lang.Object value, java.lang.Class clazz)
Constructs a constant with a given value and class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class
getContentClass()
Returns a class of which this object's value will be an instance.java.lang.Object
getValue()
Returns this object's value.
-
-
-
Constructor Detail
-
FixedConstant
public FixedConstant(java.lang.Object value, java.lang.Class clazz)
Constructs a constant with a given value and class.- Parameters:
clazz
- content classvalue
- value
-
FixedConstant
public FixedConstant(java.lang.Object value)
Constructs a constant with a given value. The class is the class ofvalue
.- Parameters:
value
- value
-
-
Method Detail
-
getContentClass
public java.lang.Class getContentClass()
Description copied from interface:Constant
Returns a class of which this object's value will be an instance.- Specified by:
getContentClass
in interfaceConstant
- Returns:
- content class
-
getValue
public java.lang.Object getValue()
Description copied from interface:Constant
Returns this object's value. Not necessarily always the same. Must be an instance ofConstant.getContentClass()
(or null).
-
-