public class FeatureKey extends Object implements Comparable<FeatureKey>, Serializable
EStructuralFeature of a PersistentEObject.| Modifier | Constructor and Description |
|---|---|
protected |
FeatureKey(Id id,
String name)
Constructs a new
FeatureKey with the given id and the given name, which are used as a
simple representation of a feature of an object. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(FeatureKey o) |
boolean |
equals(Object o) |
static FeatureKey |
from(InternalEObject internalObject,
EStructuralFeature feature)
Creates a new
FeatureKey from the given internalObject and the given feature. |
static FeatureKey |
from(PersistentEObject object,
EStructuralFeature feature)
Creates a new
FeatureKey from the given object and the given feature. |
int |
hashCode() |
Id |
id()
Returns the identifier of the
PersistentEObject. |
String |
name()
Returns the name of the
EStructuralFeature of the PersistentEObject. |
static FeatureKey |
of(Id id,
String name)
Creates a new
FeatureKey with the given id and the given name, which are used as a
simple representation of a feature of an object. |
String |
toString() |
MultivaluedFeatureKey |
withPosition(int position)
Creates a new
MultivaluedFeatureKey with the Id and the name of this FeatureKey, and
adding the given position. |
protected FeatureKey(@Nonnull Id id, @Nonnull String name)
FeatureKey with the given id and the given name, which are used as a
simple representation of a feature of an object.id - the identifier of the PersistentEObjectname - the name of the EStructuralFeature of the PersistentEObject@Nonnull public static FeatureKey from(@Nonnull InternalEObject internalObject, @Nonnull EStructuralFeature feature)
FeatureKey from the given internalObject and the given feature.
This method behaves like: from(PersistentEObject.from(internalObject), feature).
internalObject - the InternalEObject that will be adapted as PersistentEObjectfeature - the EStructuralFeature of the PersistentEObjectFeatureKeyfrom(PersistentEObject, EStructuralFeature),
PersistentEObject.from(Object),
ENamedElement.getName()@Nonnull public static FeatureKey from(@Nonnull PersistentEObject object, @Nonnull EStructuralFeature feature)
FeatureKey from the given object and the given feature.
This method behaves like: of(object.id(), feature.getName()).
object - the PersistentEObjectfeature - the EStructuralFeature of the PersistentEObjectFeatureKeyof(Id, String),
PersistentEObject.id(),
ENamedElement.getName()@Nonnull public static FeatureKey of(@Nonnull Id id, @Nonnull String name)
FeatureKey with the given id and the given name, which are used as a
simple representation of a feature of an object.id - the identifier of the PersistentEObjectname - the name of the EStructuralFeature of the PersistentEObjectFeatureKey@Nonnull public Id id()
PersistentEObject.@Nonnull public String name()
EStructuralFeature of the PersistentEObject.@Nonnull public MultivaluedFeatureKey withPosition(@Nonnegative int position)
MultivaluedFeatureKey with the Id and the name of this FeatureKey, and
adding the given position.position - the position of the EStructuralFeatureMultivaluedFeatureKeyof(Id, String)public int compareTo(@Nonnull FeatureKey o)
compareTo in interface Comparable<FeatureKey>Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.