public final class IntervalTypeImplementation extends AbstractJavaBackedTypeImplementation_V0105 implements PossRepImplementation_V0105
| Constructor and Description |
|---|
IntervalTypeImplementation(AbstractTypeImplementation_V0105 baseTypeImplementation)
Creates the IntervalTypeImplementation
|
| Modifier and Type | Method and Description |
|---|---|
AbstractTypeImplementation_V0105 |
getBaseTypeImplementation()
Gets baseTypeImplementation
|
OperatorImplementation_V0104 |
getBaseTypeOrderingOperatorImplementation()
Gets baseTypeOrderingOperatorImplementation
|
ReadOnlyMap<NameIdentifier,TypeDeclaration> |
getComponentIdentifierTypeDeclarationsMap()
Gets a map of component names to corresponding type declarations.
|
MyReadOnlyMap<java.lang.String,java.lang.String> |
getComponentNameMap()
Gets a map of component/type names.
|
ReadOnlyMap<java.lang.String,TypeDeclaration> |
getComponentTypeDeclarationsMap()
Gets a map of component names to corresponding type declarations.
|
ValueBuffer |
getComponentValue(java.lang.String componentName,
ScalarValueBuffer valueBuffer)
"Extracts" a possrep component value out of a value of the type
|
ValueBuffer |
getComponentValue(java.lang.String componentName,
ValueBuffer valueBuffer)
"Extracts" a possrep component value out of a value of the type
|
ValueBuffer |
getComponentValue(java.lang.String componentName,
ValueBuffer valueBuffer,
Heading nonScalarHeading)
"Extracts" a possrep component value out of a value of the type.
|
MyReadOnlyMap<java.lang.String,ValueBuffer> |
getComponentValues(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Gets all the possrep component values for a given value of the type this possrep is for
|
static java.lang.String |
getCorrespondingBaseTypeName(java.lang.String intervalTypeName)
Gets the name of the interval type corresponding to a given typeName, if that type is ordered
|
static java.lang.String |
getCorrespondingIntervalTypeName(java.lang.String typeName)
Gets the name of the interval type corresponding to a given typeName, if that type is ordered
|
PossRepImplementation |
getDefaultPossrepImplementation()
Gets the possrep implementation that is to be considered the default for the type.
|
ValueBuffer |
getEmptyIntervalValue(ValueBuffer beginValueBuffer)
Gets a ValueBuffer depicting an empty interval of the underlying type whose physical encoding size is given.
|
int |
getEncodingLength()
Gets the fixed encoding length, if the type employs fixed-length encoding, i.e.
|
ValueBuffer |
getFullyBoundedIntervalValue(ValueBuffer beginValueBuffer,
ValueBuffer endValueBuffer) |
MyReadOnlyMap<NameIdentifier,ValueBuffer> |
getIdentifierComponentValues(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Gets all the possrep component values for a given value of the type this possrep is for
|
ValueBuffer |
getNegativeInfiniteIntervalValue(ValueBuffer endValueBuffer)
Gets a valueBuffer holding the interval value from "negative infinity" to the END value provided in the given endValueBuffer
|
ValueBuffer |
getPositiveInfiniteIntervalValue(ValueBuffer beginValueBuffer)
Gets a valueBuffer holding the interval value from the point value held in the provided value buffer to "positive infinity"
|
MyReadOnlySet<PossRepImplementation> |
getPossrepImplementations()
Gets the set of all PossRepImplementations for this type.
|
java.lang.String |
getPossrepName()
Gets the possrep name
|
static ValueBuffer |
getWhollyInfiniteIntervalValue()
Gets a ValueBuffer denoting the "universal interval" of the underlying type, i.e.
|
boolean |
hasVariableLengthEncoding()
Determines whether the number of bytes used in the physical encoding is the same for any possible value of the type.
|
static boolean |
isFullyBounded(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, has both a begin and end component
|
static boolean |
isFullyUnbounded(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, has both a begin and end component
|
static boolean |
isLowerBounded(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, has a begin component.
|
static boolean |
isLowerInfinite(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, lacks a begin component.
|
static boolean |
isUpperBounded(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, has an end component
truth table
xx01 ===> true
xx00 ===> false
|
static boolean |
isUpperInfinite(short finitenessIndicator)
Checks whether the interval value that the given finiteness indicator was drawn from, lacks an end component
truth table
xx01 ===> false
xx00 ===> true
|
void |
readExternal(java.io.ObjectInput in) |
ValueBuffer |
valueFromComponentValues(java.util.Map<java.lang.String,ValueBuffer> componentValueMap)
Returns a ValueBuffer holding the value of the type that this PossRepImplementation is for, and that corresponds to the component values given in the componentValueMap argument.
|
ValueBuffer |
valueFromExternalRepresentation(java.lang.String value,
Heading nonScalarHeading)
Convert a value of this possrep's type to internal format.
|
ValueBuffer |
valueFromIdentifierComponentValues(java.util.Map<NameIdentifier,ValueBuffer> componentValueMap)
Returns a ValueBuffer holding the value of the type that this PossRepImplementation is for, and that corresponds to the component values given in the componentValueMap argument.
|
java.lang.String |
valueToEscapedExternalRepresentation(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Converts a value in internal format to the appropriate textual representation of that value for this possrep.
|
java.lang.String |
valueToEscapedExternalRepresentationVerbose(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Converts a value in internal format to the appropriate textual representation of that value for this possrep, including the surrounding typename (i.e.
|
java.lang.String |
valueToExternalRepresentation(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Converts a value in internal format to the appropriate textual representation of that value for this possrep.
|
java.lang.String |
valueToExternalRepresentationVerbose(ValueBuffer valueBuffer,
Heading nonScalarHeading)
Converts a value in internal format to the appropriate textual representation of that value for this possrep, including the surrounding typename (i.e.
|
void |
writeExternal(java.io.ObjectOutput out) |
getEqualityOperatorImplementation, getOrderingOperatorImplementation, getPossrepImplementation, getRootTypeName, isOfTypegetCommonScalarSuperTypeImplementation, getOrdinalOperatorImplementations, getTypeName, getTypeNameIdentifier, valueFromEscapedExternalRepresentation, valueFromEscapedExternalRepresentation, valueFromEscapedExternalRepresentationWithoutExceptionpublic IntervalTypeImplementation(AbstractTypeImplementation_V0105 baseTypeImplementation) throws TypeIsNotOrderedException
baseTypeImplementation - The implementation object of the underlying base typeTypeIsNotOrderedException - If the underlying base type is not ordered, i.e. no ordering operator GT_xxx_xxx is defined for the base typepublic static java.lang.String getCorrespondingBaseTypeName(java.lang.String intervalTypeName)
intervalTypeName - The name of an ordered typepublic static java.lang.String getCorrespondingIntervalTypeName(java.lang.String typeName)
typeName - The name of an ordered typepublic static boolean isFullyBounded(short finitenessIndicator)
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic static boolean isFullyUnbounded(short finitenessIndicator)
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic static boolean isLowerBounded(short finitenessIndicator)
| 01xx ===> true |
| 00xx ===> false |
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic static boolean isLowerInfinite(short finitenessIndicator)
| 01xx ===> false |
| 00xx ===> true |
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic static boolean isUpperBounded(short finitenessIndicator)
| xx01 ===> true |
| xx00 ===> false |
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic static boolean isUpperInfinite(short finitenessIndicator)
| xx01 ===> false |
| xx00 ===> true |
finitenessIndicator - The finiteNess indicator obtained from some physically recorded interval valuepublic final AbstractTypeImplementation_V0105 getBaseTypeImplementation()
public final OperatorImplementation_V0104 getBaseTypeOrderingOperatorImplementation()
public ReadOnlyMap<NameIdentifier,TypeDeclaration> getComponentIdentifierTypeDeclarationsMap()
PossRepImplementation_V0105getComponentIdentifierTypeDeclarationsMap in interface PossRepImplementation_V0105public final MyReadOnlyMap<java.lang.String,java.lang.String> getComponentNameMap()
PossRepImplementationgetComponentNameMap in interface PossRepImplementationpublic ReadOnlyMap<java.lang.String,TypeDeclaration> getComponentTypeDeclarationsMap()
PossRepImplementationgetComponentTypeDeclarationsMap in interface PossRepImplementationpublic final ValueBuffer getComponentValue(java.lang.String componentName, ScalarValueBuffer valueBuffer)
PossRepImplementationgetComponentValue in interface PossRepImplementationcomponentName - The possrep component NamevalueBuffer - The scalarValueBuffer holding the value of which the possrep's component's value is to be extractedpublic ValueBuffer getComponentValue(java.lang.String componentName, ValueBuffer valueBuffer)
PossRepImplementationgetComponentValue in interface PossRepImplementationcomponentName - The possrep component NamevalueBuffer - The scalarValueBuffer holding the value of which the possrep's component's value is to be extractedpublic ValueBuffer getComponentValue(java.lang.String componentName, ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementation_V0105getComponentValue in interface PossRepImplementation_V0105componentName - The possrep component NamevalueBuffer - The scalarValueBuffer holding the value of which the possrep's component's value is to be extractednonScalarHeading - The heading defining the nonScalar type that the value in the (nonscalar) valueBuffer is of.public MyReadOnlyMap<java.lang.String,ValueBuffer> getComponentValues(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementationgetComponentValues in interface PossRepImplementationvalueBuffer - The scalarValueBuffer holding the value of which the possrep's component's value is to be extractednonScalarHeading - The heading defining the specific nonScalar type, if the type is nonScalar and the value is a body value alonepublic final PossRepImplementation getDefaultPossrepImplementation()
AbstractTypeImplementation_V0105getDefaultPossrepImplementation in class AbstractTypeImplementation_V0105public ValueBuffer getEmptyIntervalValue(ValueBuffer beginValueBuffer)
beginValueBuffer - The actual (valid) value of the underlying type that will be used to fill the begin and end parts of the interval valuepublic int getEncodingLength()
AbstractTypeImplementation_V0105hasVariableLengthEncoding() method returns 'false'. Types that employ variable-length encodings are required to return a negative value.getEncodingLength in class AbstractTypeImplementation_V0105hasVariableLengthEncoding() method returns 'false'. Types that employ variable-length encodings are required to return a negative value.public ValueBuffer getFullyBoundedIntervalValue(ValueBuffer beginValueBuffer, ValueBuffer endValueBuffer)
beginValueBuffer - -endValueBuffer - -public MyReadOnlyMap<NameIdentifier,ValueBuffer> getIdentifierComponentValues(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementation_V0105getIdentifierComponentValues in interface PossRepImplementation_V0105valueBuffer - The scalarValueBuffer holding the value of which the possrep's component's value is to be extractednonScalarHeading - The heading defining the specific nonScalar type, if the type is nonScalar and the value is a body value alonepublic ValueBuffer getNegativeInfiniteIntervalValue(ValueBuffer endValueBuffer)
endValueBuffer - The END component of the interval value to be returnedpublic ValueBuffer getPositiveInfiniteIntervalValue(ValueBuffer beginValueBuffer)
beginValueBuffer - The BEGIN component of the interval value to be returnedpublic final MyReadOnlySet<PossRepImplementation> getPossrepImplementations()
AbstractTypeImplementation_V0105getPossrepImplementations in class AbstractTypeImplementation_V0105public final java.lang.String getPossrepName()
PossRepImplementationgetPossrepName in interface PossRepImplementationpublic static ValueBuffer getWhollyInfiniteIntervalValue()
public final boolean hasVariableLengthEncoding()
AbstractTypeImplementation_V0105hasVariableLengthEncoding in class AbstractTypeImplementation_V0105public void readExternal(java.io.ObjectInput in)
readExternal in interface java.io.Externalizablepublic final ValueBuffer valueFromComponentValues(java.util.Map<java.lang.String,ValueBuffer> componentValueMap)
PossRepImplementationvalueFromComponentValues in interface PossRepImplementationcomponentValueMap - A Map holding component names and their corresponding values, held in a ValueBuffer.public final ValueBuffer valueFromExternalRepresentation(java.lang.String value, Heading nonScalarHeading) throws InvalidValueException
PossRepImplementationvalueFromExternalRepresentation in interface PossRepImplementationvalue - the value in external format.nonScalarHeading - The heading defining the specific nonScalar type, if the type is nonScalar and the value is a body value aloneInvalidValueException - If the textual representation does not represent a value of the possrep's type.public ValueBuffer valueFromIdentifierComponentValues(java.util.Map<NameIdentifier,ValueBuffer> componentValueMap)
PossRepImplementation_V0105valueFromIdentifierComponentValues in interface PossRepImplementation_V0105componentValueMap - A Map holding component names and their corresponding values, held in a ValueBuffer.public final java.lang.String valueToEscapedExternalRepresentation(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementationvalueToEscapedExternalRepresentation in interface PossRepImplementationvalueBuffer - The value in internal format.nonScalarHeading - The heading defining the specific nonScalar type, if the type the value held in valueBuffer is of, is indeed nonScalar. Can be left null for scalar types, as they are not "defined" by a Heading.public java.lang.String valueToEscapedExternalRepresentationVerbose(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementation_V0105valueToEscapedExternalRepresentationVerbose in interface PossRepImplementation_V0105valueBuffer - The value in internal format.nonScalarHeading - The heading defining the specific nonScalar type, if the type the value held in valueBuffer is of, is indeed nonScalar. Can be left null for scalar types, as they are not "defined" by a Heading.public final java.lang.String valueToExternalRepresentation(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementationvalueToExternalRepresentation in interface PossRepImplementationvalueBuffer - The value in internal format.nonScalarHeading - The heading defining the specific nonScalar type, if the type the value held in valueBuffer is of, is indeed nonScalar. Can be left null for scalar types, as they are not "defined" by a Heading.public java.lang.String valueToExternalRepresentationVerbose(ValueBuffer valueBuffer, Heading nonScalarHeading)
PossRepImplementation_V0105valueToExternalRepresentationVerbose in interface PossRepImplementation_V0105valueBuffer - The value in internal format.nonScalarHeading - The heading defining the specific nonScalar type, if the type the value held in valueBuffer is of, is indeed nonScalar. Can be left null for scalar types, as they are not "defined" by a Heading.public void writeExternal(java.io.ObjectOutput out)
writeExternal in interface java.io.Externalizable