public final class NonScalarTypeDeclaration extends TypeDeclaration
INT, NAME, STRING
Constructor and Description |
---|
NonScalarTypeDeclaration(Heading heading,
NameIdentifier typeName)
Creates the typedeclaration
|
NonScalarTypeDeclaration(Heading heading,
NameIdentifier typeName,
java.util.Collection<KeyDef> keySpecifications,
java.lang.String relationPredicate)
Creates the NonScalarTypeDeclaration
|
NonScalarTypeDeclaration(Heading heading,
java.lang.String typeName)
Deprecated.
deprecated
|
NonScalarTypeDeclaration(Heading heading,
java.lang.String typeName,
java.util.Collection<KeyDef> keySpecifications,
java.lang.String relationPredicate)
Deprecated.
deprecated
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsNonScalarTypeDeclaration(NonScalarTypeDeclaration obj)
Compares this NonScalarTypeDeclaration to another one for equality.
|
static TypeDeclaration |
getCommonNonScalarSubTypeDeclaration(NonScalarTypeDeclaration t1,
NonScalarTypeDeclaration t2)
Gets the type declaration that is the declaration for the type that is the least specific subtype for both types given
|
static TypeDeclaration |
getCommonNonScalarSuperTypeDeclaration(NonScalarTypeDeclaration t1,
NonScalarTypeDeclaration t2)
Gets the type declaration that is the declaration for the type that is the most specific supertype for both types given
|
Heading |
getHeading()
Gets the heading defining the concerned nonscalar type
|
java.util.Collection<KeyDef> |
getKeySpecifications()
Gets keySpecifications
|
java.lang.String |
getRelationPredicate()
Gets The predicate corresponding to the nonscalar value held in the container that this typedeclaration is for
|
NonScalarValueBuffer |
getValueBuffer(java.nio.ByteBuffer attributeValueEncoding)
Gets the appropriate (i.e.
|
int |
hashCode() |
boolean |
isIntervalTyped()
Checks whether the declared scalar type is interval-typed.
|
boolean |
isScalar()
Checks whether the declared type is scalar
|
boolean |
matchesExpectedTypeDeclaration(TypeDeclaration expectedTypeDeclaration)
Checks whether this type declaration "matches" the given expected type declaration, i.e.
|
java.lang.String |
toString() |
getCommonSubTypeDeclaration, getCommonSuperTypeDeclaration, getTypeDeclaration, getTypeDeclaration, getTypeName, getTypeNameIdentifier, isNonScalarType, isScalarType
public NonScalarTypeDeclaration(Heading heading, NameIdentifier typeName)
heading
- The heading defining the details of the nonscalar type the declaration si fortypeName
- The name of the nonscalar type that the declaration is forpublic NonScalarTypeDeclaration(Heading heading, NameIdentifier typeName, java.util.Collection<KeyDef> keySpecifications, java.lang.String relationPredicate)
heading
- The heading defining the details of the nonscalar type the declaration si fortypeName
- The name of the nonscalar type that the declaration is forkeySpecifications
- The set of key specifications that relations corresponding to this type declaration are known to satisfy. Only maintained for RELATION type declarationsrelationPredicate
- The predicate corresponding to the nonscalar value held in the container that this typedeclaration is for@Deprecated public NonScalarTypeDeclaration(Heading heading, java.lang.String typeName)
heading
- The heading defining the details of the nonscalar type the declaration si fortypeName
- The name of the nonscalar type that the declaration is for@Deprecated public NonScalarTypeDeclaration(Heading heading, java.lang.String typeName, java.util.Collection<KeyDef> keySpecifications, java.lang.String relationPredicate)
heading
- The heading defining the details of the nonscalar type the declaration si fortypeName
- The name of the nonscalar type that the declaration is forkeySpecifications
- The set of key specifications that relations corresponding to this type declaration are known to satisfy. Only maintained for RELATION type declarationsrelationPredicate
- The predicate corresponding to the nonscalar value held in the container that this typedeclaration is forpublic static TypeDeclaration getCommonNonScalarSubTypeDeclaration(NonScalarTypeDeclaration t1, NonScalarTypeDeclaration t2) throws NotFoundException
t1
- type 1t2
- type 2NotFoundException
- If no such supertype exists.public static TypeDeclaration getCommonNonScalarSuperTypeDeclaration(NonScalarTypeDeclaration t1, NonScalarTypeDeclaration t2) throws NotFoundException
t1
- type 1t2
- type 2NotFoundException
- If no such supertype exists. This is the case if one type is a relation type and the other is a tuple type, or if the involved headings' attribute name sets are unequal, or if an attribute in the involved headings is of respective types that do not have a common supertype.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsNonScalarTypeDeclaration(NonScalarTypeDeclaration obj)
obj
- Another NonScalarTypeDeclaration to compare this one to for equalitypublic final Heading getHeading()
public final java.util.Collection<KeyDef> getKeySpecifications()
public final java.lang.String getRelationPredicate()
public NonScalarValueBuffer getValueBuffer(java.nio.ByteBuffer attributeValueEncoding)
TypeDeclaration
getValueBuffer
in class TypeDeclaration
attributeValueEncoding
- an encoding of a value of this typepublic int hashCode()
hashCode
in class java.lang.Object
public boolean isIntervalTyped()
TypeDeclaration
isIntervalTyped
in class TypeDeclaration
public final boolean isScalar()
TypeDeclaration
isScalar
in class TypeDeclaration
public boolean matchesExpectedTypeDeclaration(TypeDeclaration expectedTypeDeclaration)
TypeDeclaration
matchesExpectedTypeDeclaration
in class TypeDeclaration
expectedTypeDeclaration
- A type declaration that is expected to be a declaration for a supertype of this onepublic java.lang.String toString()
toString
in class java.lang.Object