Package com._1c.g5.v8.dt.lcore.util
Class FeatureSetting
- java.lang.Object
-
- com._1c.g5.v8.dt.lcore.util.FeatureSetting
-
public final class FeatureSetting extends Object
Represents a value held by a feature of an object.
-
-
Constructor Summary
Constructors Constructor Description FeatureSetting(org.eclipse.emf.ecore.EObject containedObject)
Constructs a new containment feature setting for the given contained object.FeatureSetting(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature)
Constructs a new single-valued feature setting.FeatureSetting(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int index)
Constructs a new feature setting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
org.eclipse.emf.ecore.EStructuralFeature
getFeature()
Returns the specific feature holding a value for the object.FeatureIndex
getFeatureIndex()
Returns the feature and the index grouped together.int
getIndex()
Returns the index of a value in the list of feature values.org.eclipse.emf.ecore.EObject
getOwner()
Returns the object holding a value.Object
getValue()
Returns the resolved value held by the feature of the object.int
hashCode()
boolean
isContainment()
Returns whether this setting describes containment relationship.String
toString()
-
-
-
Constructor Detail
-
FeatureSetting
public FeatureSetting(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int index)
Constructs a new feature setting.- Parameters:
owner
- the object holding a value (notnull
)feature
- the specific feature holding a value for the object (notnull
)index
- the index of a value in the list of feature values. Ignored if the feature is single-valued
-
FeatureSetting
public FeatureSetting(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature)
Constructs a new single-valued feature setting.- Parameters:
owner
- the object holding a value (notnull
)feature
- the specific single-valued feature holding a value for the object (notnull
)
-
FeatureSetting
public FeatureSetting(org.eclipse.emf.ecore.EObject containedObject)
Constructs a new containment feature setting for the given contained object.- Parameters:
containedObject
- notnull
. Must have a containing object
-
-
Method Detail
-
getOwner
public org.eclipse.emf.ecore.EObject getOwner()
Returns the object holding a value.- Returns:
- the object holding a value (never
null
)
-
getFeature
public org.eclipse.emf.ecore.EStructuralFeature getFeature()
Returns the specific feature holding a value for the object.- Returns:
- the specific feature holding a value for the object
(never
null
)
-
getIndex
public int getIndex()
Returns the index of a value in the list of feature values. Returns0
if the feature is single-valued.- Returns:
- the value index
-
getFeatureIndex
public FeatureIndex getFeatureIndex()
Returns the feature and the index grouped together.- Returns:
- the feature and the index grouped together
(never
null
)
-
getValue
public Object getValue()
Returns the resolved value held by the feature of the object.- Returns:
- the resolved value held by the feature of the object
-
isContainment
public boolean isContainment()
Returns whether this setting describes containment relationship.- Returns:
true
if this setting describes containment relationship,false
otherwise
-
-