public class ScalarType extends Object implements Type
An instance of this class means a scalar value of unknown type.
Usually one of the derived classes NumericType,
StringType, BooleanType is used instead.
| Constructor and Description |
|---|
ScalarType() |
| Modifier and Type | Method and Description |
|---|---|
Dimension |
getDimension()
Returns the dimension of this type, or null if not known.
|
Hierarchy |
getHierarchy()
Returns the hierarchy of this type.
|
Level |
getLevel()
Returns the level of this type, or null if not known.
|
boolean |
usesDimension(Dimension dimension,
boolean maybe)
Returns whether this type contains a given dimension.
For example:
DimensionType([Gender]) uses only the
[Gender] dimension.
TupleType(MemberType([Gender]), MemberType([Store]))
uses [Gender] and [Store]
dimensions.
The maybe parameter comes into play when the
dimensional information is incomplete. |
public boolean usesDimension(Dimension dimension, boolean maybe)
TypeDimensionType([Gender]) uses only the
[Gender] dimension.TupleType(MemberType([Gender]), MemberType([Store]))
uses [Gender] and [Store]
dimensions.maybe parameter comes into play when the
dimensional information is incomplete. For example, when applied to
TupleType(MemberType(null), MemberType([Store])),
usesDimension([Gender], false) returns true because it
is possible that the expression returns a member of the
[Gender] dimension.usesDimension in interface Typedimension - Dimensionmaybe - If true, returns true only if this type definitely
uses the dimensionmaybe is true,
possibly) uses the given dimensionpublic Hierarchy getHierarchy()
TypegetHierarchy in interface Typepublic Level getLevel()
Typepublic Dimension getDimension()
TypegetDimension in interface Type