@Immutable @ParametersAreNonnullByDefault public class SingleFeatureBean extends AbstractFeatureBean
EStructuralFeature
of a PersistentEObject
.id, owner, position
Modifier | Constructor and Description |
---|---|
protected |
SingleFeatureBean(Id owner,
int id)
Constructs a new
SingleFeatureBean 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 SingleFeatureBean |
from(org.eclipse.emf.ecore.InternalEObject owner,
org.eclipse.emf.ecore.EStructuralFeature feature)
Creates a new
SingleFeatureBean from the given owner and the given feature . |
static SingleFeatureBean |
from(PersistentEObject owner,
org.eclipse.emf.ecore.EStructuralFeature feature)
Creates a new
SingleFeatureBean from the given owner and the given feature . |
boolean |
isMany()
Checks if this feature is multi-valued.
|
static SingleFeatureBean |
of(Id owner,
int id)
Creates a new
SingleFeatureBean with the given owner and the given id , which are used as
a simple representation of a feature of an object. |
String |
toString() |
compareTo, equals, hashCode, id, owner, position, withPosition
protected SingleFeatureBean(Id owner, int id)
SingleFeatureBean
with the given owner
and the given id
, which are used
as a simple representation of a feature of an object.owner
- the identifier of the object using the featureid
- the identifier of the feature of the owner
NullPointerException
- if any argument is null
@Nonnull public static SingleFeatureBean from(org.eclipse.emf.ecore.InternalEObject owner, org.eclipse.emf.ecore.EStructuralFeature feature)
SingleFeatureBean
from the given owner
and the given feature
.
This method behaves like: from(PersistentEObject.from(owner), feature)
.
owner
- the object that will be adapted to retrieve its identifierfeature
- the feature of the owner
from which the name will be extractedSingleFeatureBean
NullPointerException
- if any argument is null
from(PersistentEObject, EStructuralFeature)
,
PersistentEObject.from(Object)
,
ENamedElement.getName()
@Nonnull public static SingleFeatureBean from(PersistentEObject owner, org.eclipse.emf.ecore.EStructuralFeature feature)
SingleFeatureBean
from the given owner
and the given feature
.
This method behaves like: of(owner.id(), feature.getName())
.
owner
- the object from which the identifier will be extractedfeature
- the feature of the owner
from which the name will be extractedSingleFeatureBean
NullPointerException
- if any argument is null
of(Id, int)
,
PersistentEObject.id()
,
ENamedElement.getName()
@Nonnull public static SingleFeatureBean of(Id owner, int id)
SingleFeatureBean
with the given owner
and the given id
, which are used as
a simple representation of a feature of an object.owner
- the identifier of the objectid
- the identifier of the feature of the owner
SingleFeatureBean
NullPointerException
- if any argument is null
public boolean isMany()
FeatureBean
true
if this feature is multi-valuedCopyright © 2013–2019 Atlanmod. All rights reserved.