@Immutable @ParametersAreNonnullByDefault public class ManyFeatureBean extends AbstractFeatureBean
EStructuralFeature of a PersistentEObject. The "multi-valued" characteristic is identified with a position.id, owner, position| Modifier | Constructor and Description |
|---|---|
protected |
ManyFeatureBean(Id owner,
int id,
int position)
Constructs a new
ManyFeatureBean with the given owner and the given id, which are used as
a simple representation of a feature of an object. |
| Modifier and Type | Method and Description |
|---|---|
static ManyFeatureBean |
from(org.eclipse.emf.ecore.InternalEObject owner,
org.eclipse.emf.ecore.EStructuralFeature feature,
int position)
Creates a new
ManyFeatureBean from the given owner and the given feature. |
static ManyFeatureBean |
from(PersistentEObject owner,
org.eclipse.emf.ecore.EStructuralFeature feature,
int position)
Creates a new
ManyFeatureBean from the given owner and the given feature. |
boolean |
isMany()
Checks if this feature is multi-valued.
|
static ManyFeatureBean |
of(Id owner,
int id,
int position)
Creates a new
ManyFeatureBean with the given owner and the given id, which are used as a
simple representation of a feature of an object. |
String |
toString() |
SingleFeatureBean |
withoutPosition()
Creates a new
SingleFeatureBean with the Id and the name of this
ManyFeatureBean, without its position. |
compareTo, equals, hashCode, id, owner, position, withPositionprotected ManyFeatureBean(Id owner, int id, @Nonnegative int position)
ManyFeatureBean with the given owner and the given id, which are used as
a simple representation of a feature of an object. The "multi-valued" characteristic is identified with the
position.owner - the identifier of the object using the featureid - the identifier of the feature of the ownerposition - the position of the featureNullPointerException - if any argument is nullIllegalArgumentException - if the position is negative@Nonnull public static ManyFeatureBean from(org.eclipse.emf.ecore.InternalEObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int position)
ManyFeatureBean from the given owner and the given feature.
This method behaves like: from(PersistentEObject.from(owner), feature, position).
owner - the object that will be adapted to retrieve its identifierfeature - the feature of the owner from which the name will be extractedposition - the position of the featureManyFeatureBeanNullPointerException - if any argument is nullIllegalArgumentException - if the position is negativefrom(PersistentEObject, EStructuralFeature, int),
PersistentEObject.from(Object),
ENamedElement.getName()@Nonnull public static ManyFeatureBean from(PersistentEObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int position)
ManyFeatureBean from the given owner and the given feature.
This method behaves like: of(owner.id(), feature.getName(), position).
owner - the object from which the identifier will be extractedfeature - the feature of the owner from which the name will be extractedposition - the position of the featureManyFeatureBeanNullPointerException - if any argument is nullIllegalArgumentException - if the position is negativeof(Id, int, int),
PersistentEObject.id(),
ENamedElement.getName()@Nonnull public static ManyFeatureBean of(Id owner, int id, @Nonnegative int position)
ManyFeatureBean with the given owner and the given id, which are used as a
simple representation of a feature of an object. The "multi-valued" characteristic is identified with the position.owner - the identifier of the objectid - the identifier of the feature of the ownerposition - the position of the featureManyFeatureBeanNullPointerException - if any argument is nullIllegalArgumentException - if the position is negative@Nonnull public SingleFeatureBean withoutPosition()
SingleFeatureBean with the Id and the name of this
ManyFeatureBean, without its position.SingleFeatureBeanSingleFeatureBean.of(Id, int)public boolean isMany()
FeatureBeantrue if this feature is multi-valuedCopyright © 2013–2019 Atlanmod. All rights reserved.