public class MultivaluedFeatureKey extends FeatureKey
EStructuralFeature of a PersistentEObject. The
"multi-valued" characteristic is identified with a position.| Modifier | Constructor and Description |
|---|---|
protected |
MultivaluedFeatureKey(Id id,
String name,
int position)
Constructs a new
MultivaluedFeatureKey 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 MultivaluedFeatureKey |
from(InternalEObject internalObject,
EStructuralFeature feature,
int position)
Creates a new
MultivaluedFeatureKey from the given internalObject and the given feature. |
static MultivaluedFeatureKey |
from(PersistentEObject object,
EStructuralFeature feature,
int position)
Creates a new
MultivaluedFeatureKey from the given object and the given feature. |
int |
hashCode() |
static MultivaluedFeatureKey |
of(Id id,
String name,
int position)
Creates a new
MultivaluedFeatureKey with the given id and the given name, which are used
as a simple representation of a feature of an object. |
int |
position()
Returns the position of the
EStructuralFeature. |
from, from, id, name, of, toString, withPositionprotected MultivaluedFeatureKey(@Nonnull Id id, @Nonnull String name, @Nonnegative int position)
MultivaluedFeatureKey with the given id and the given name, which are
used as a simple representation of a feature of an object. The "multi-valued" characteristic is identified with
the position.id - the identifier of the PersistentEObjectname - the name of the EStructuralFeature of the PersistentEObjectposition - the position of the EStructuralFeaturepublic static MultivaluedFeatureKey from(@Nonnull InternalEObject internalObject, @Nonnull EStructuralFeature feature, @Nonnegative int position)
MultivaluedFeatureKey from the given internalObject and the given feature.
This method behaves like: from(PersistentEObject.from(internalObject), feature,
position).
internalObject - the InternalEObject that will be adapted as PersistentEObject to have its
identifierfeature - the EStructuralFeature of the PersistentEObject from which the name will be
extractedposition - the position of the EStructuralFeatureMultivaluedFeatureKeyfrom(PersistentEObject, EStructuralFeature, int),
PersistentEObject.from(Object),
ENamedElement.getName()public static MultivaluedFeatureKey from(@Nonnull PersistentEObject object, @Nonnull EStructuralFeature feature, @Nonnegative int position)
MultivaluedFeatureKey from the given object and the given feature.
This method behaves like: of(object.id(), feature.getName(), position).
object - the PersistentEObject from which the identifier will be extractedfeature - the EStructuralFeature of the PersistentEObject from which the name will be
extractedposition - the position of the EStructuralFeatureMultivaluedFeatureKeyof(Id, String, int),
PersistentEObject.id(),
ENamedElement.getName()public static MultivaluedFeatureKey of(@Nonnull Id id, @Nonnull String name, @Nonnegative int position)
MultivaluedFeatureKey with the given id and the given name, which are used
as a simple representation of a feature of an object. The "multi-valued" characteristic is identified with the
position.id - the identifier of the PersistentEObjectname - the name of the EStructuralFeature of the PersistentEObjectposition - the position of the EStructuralFeatureMultivaluedFeatureKey@Nonnegative public int position()
EStructuralFeature.public int compareTo(@Nonnull FeatureKey o)
compareTo in interface Comparable<FeatureKey>compareTo in class FeatureKeypublic int hashCode()
hashCode in class FeatureKeypublic boolean equals(@Nullable Object o)
equals in class FeatureKeyCopyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.