Package table
Class OrdinalType
java.lang.Object
table.ColType
table.OrdinalType
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
DateType
,MetricType
Class for ordinal types for data tables.
- Since:
- 2006.09.16
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Compare two values of this type.getInfo
(int id) Get the information associated with a value.Get the information associated with a value.int
Get the number of pieces of additional information.abstract Object
getMax()
Get the maximal value.Get the information associated with the maximal value.abstract Object
getMin()
Get the minimal value.Get the information associated with the minimal value.getValue
(int id) Get the value associated with an identifier.void
Set the information associated with a value.void
Get the information associated with a value.void
setMaxInfo
(Object info) Set the information for the maximal value.void
setMinInfo
(Object info) Set the information for the minimal value.Methods inherited from class table.ColType
addType, addValue, addValue, clear, clearInfo, clone, findValue, fits, getAllTypeNames, getAllTypeNames, getName, getNumberAt, getStorageClass, getStringAt, getTypeClass, getTypeClass, getTypeCount, getTypeId, getTypeId, getTypeName, getValueAt, getValueClass, getValueCount, getValueId, isNull, parseType, parseValue, setNull, setNull, setValueAt, toString
-
Field Details
-
mininfo
the information stored with the minimum value -
maxinfo
the information stored with the maximum value
-
-
Constructor Details
-
OrdinalType
public OrdinalType()Create an ordinal type.- Since:
- 2023.07.26 (Christian Borgelt)
-
-
Method Details
-
getValue
Get the value associated with an identifier. -
getMin
Get the minimal value.- Returns:
- the minimal value
- Since:
- 2006.09.11 (Christian Borgelt)
-
getMax
Get the maximal value.- Returns:
- the maximal value
- Since:
- 2006.09.11 (Christian Borgelt)
-
getMinInfo
Get the information associated with the minimal value.- Returns:
- the information associated with the minimal value
- Since:
- 2007.02.18 (Christian Borgelt)
-
setMinInfo
Set the information for the minimal value.- Parameters:
info
- the information to store with the minimal value- Since:
- 2007.02.18 (Christian Borgelt)
-
getMaxInfo
Get the information associated with the maximal value.- Returns:
- the information associated with the maximal value
- Since:
- 2007.02.18 (Christian Borgelt)
-
setMaxInfo
Set the information for the maximal value.- Parameters:
info
- the information to store with the maximal value- Since:
- 2007.02.18 (Christian Borgelt)
-
getInfoCount
public int getInfoCount()Get the number of pieces of additional information.Additional information can be stored with the minimum and the maximum value.
- Overrides:
getInfoCount
in classColType
- Returns:
- always
2
- Since:
- 2007.07.13 (Christian Borgelt)
-
getInfo
Get the information associated with a value. -
setInfo
Get the information associated with a value.If
value.toString().equals("maximum")
orvalue.toString().equals("max")
, the additional information associated with the maximum value, otherwise the additional information associated with the minimum value is set. -
getInfo
Get the information associated with a value.If
id ≤ 0
, the additional information associated with the minimum value, otherwise the additional information associated with the maximum value is retrieved. -
setInfo
Set the information associated with a value.If
id ≤ 0
, the additional information associated with the minimum value, otherwise the additional information associated with the maximum value is set. -
compare
Compare two values of this type.- Parameters:
a
- the first valueb
- the second value- Returns:
- -1 if the first value is smaller,
+1 if the second value is smaller,
0 if the value are equal - Since:
- 2007.02.02 (Christian Borgelt)
-