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, withPosition
protected 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 PersistentEObject
name
- the name of the EStructuralFeature
of the PersistentEObject
position
- the position of the EStructuralFeature
public 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 EStructuralFeature
MultivaluedFeatureKey
from(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 EStructuralFeature
MultivaluedFeatureKey
of(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 PersistentEObject
name
- the name of the EStructuralFeature
of the PersistentEObject
position
- the position of the EStructuralFeature
MultivaluedFeatureKey
@Nonnegative public int position()
EStructuralFeature
.public int compareTo(@Nonnull FeatureKey o)
compareTo
in interface Comparable<FeatureKey>
compareTo
in class FeatureKey
public int hashCode()
hashCode
in class FeatureKey
public boolean equals(@Nullable Object o)
equals
in class FeatureKey
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.