public class FeatureImpl extends Object implements Feature
Modifier and Type | Field and Description |
---|---|
boolean |
isAnnotBaseSofaRef
true for the feature which is the AnnotationBase sofa reference.
|
boolean |
isInInt |
boolean |
isLongOrDouble
true if the range is a long or double
|
int |
rangeTypeClass
type class of the range, including CasSerializer List constants
|
static FeatureImpl |
singleton
Used by CAS Copier to denote missing feature
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Feature o)
This should work across different type systems, for instance
when using filtered serialization
|
long |
computeHashCodeLong()
Hashcode and equals are used, possibly for features in different type systems,
where the features should be "equal".
|
boolean |
equals(Object obj) |
int |
getAdjustedOffset() |
int |
getCode() |
Type |
getDomain()
Get the domain type for this feature.
|
String |
getName()
Get the fully qualified name for this feature.
|
int |
getOffset() |
Type |
getRange()
Get the range type for this feature.
|
TypeImpl |
getRangeImpl() |
String |
getShortName()
Get the unqualified, short name of this feature.
|
SlotKinds.SlotKind |
getSlotKind() |
int |
hashCode() |
long |
hashCodeLong() |
boolean |
isMultipleReferencesAllowed()
Checks if there can be multiple references to values of this feature.
|
String |
toString() |
void |
validateIsInAllowedValue(String v)
throw if v is not in the allowed value set of the range type
|
public final boolean isInInt
public final boolean isLongOrDouble
public final boolean isAnnotBaseSofaRef
public final int rangeTypeClass
public static final FeatureImpl singleton
public int getCode()
public Type getDomain()
public Type getRange()
null
.public TypeImpl getRangeImpl()
public SlotKinds.SlotKind getSlotKind()
public String getName()
public String getShortName()
Feature
getShortName
in interface Feature
public boolean isMultipleReferencesAllowed()
Feature
If this is false it indicates that this feature has exclusive ownership of the array or list, so changes to the array or list are localized. If this is true it indicates that the array or list may be shared, so changes to it may affect other objects in the CAS.
isMultipleReferencesAllowed
in interface Feature
true
iff the value type of this feature is an array or list and has been
declared to allow multiple references.public int getOffset()
public int getAdjustedOffset()
public void validateIsInAllowedValue(String v)
v
- the value to checkpublic long hashCodeLong()
public long computeHashCodeLong()
public int compareTo(Feature o)
compareTo
in interface Comparable<Feature>
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.