Package com.nomagic.magicdraw.properties
Class ListProperty
- java.lang.Object
-
- com.nomagic.magicdraw.properties.Property
-
- com.nomagic.magicdraw.properties.ListProperty
-
- All Implemented Interfaces:
PropertyVisitorAcceptor,java.lang.Cloneable
- Direct Known Subclasses:
ClassPathEntriesListProperty,ElementListProperty
@OpenApiAll public class ListProperty extends Property
ListPropertyrepresents a property for storing and editing entries of the list.
-
-
Field Summary
-
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE
-
-
Constructor Summary
Constructors Constructor Description ListProperty()Creates and initializes a newListPropertyobject.ListProperty(java.lang.String id, java.lang.Object[] value)Creates and initializes a newListPropertyobject from specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PropertyVisitor v)Accepts the given visitor.ListPropertyclone()Clones the property.java.lang.StringgetClassType()Returns a class type of the property.java.lang.Object[]getValue()Returns properties value.java.lang.StringgetValueStringRepresentation()Returns value's string representation.voidsetValue(java.lang.Object value)Sets a value of the property.-
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addPropertyChangeListener, addSource, addSources, areValuesEqual, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, hashCode, isEditable, isUndefinedState, isValueCompatible, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
-
-
-
-
Constructor Detail
-
ListProperty
public ListProperty()
Creates and initializes a newListPropertyobject. ID of the property will be empty string and value - null.
-
ListProperty
public ListProperty(java.lang.String id, java.lang.Object[] value)Creates and initializes a newListPropertyobject from specified parameters.- Parameters:
id- - id of the property.value- - value of the property.
-
-
Method Detail
-
setValue
public void setValue(@CheckForNull java.lang.Object value)Sets a value of the property.
-
getClassType
public java.lang.String getClassType()
Returns a class type of the property.- Specified by:
getClassTypein interfacePropertyVisitorAcceptor- Overrides:
getClassTypein classProperty- Returns:
- PropertyID.LIST_PROPERTY
- See Also:
PropertyID.LIST_PROPERTY
-
accept
public void accept(PropertyVisitor v) throws java.lang.Exception
Accepts the given visitor.- Specified by:
acceptin interfacePropertyVisitorAcceptor- Overrides:
acceptin classProperty- Parameters:
v- the PropertyVisitor.- Throws:
java.lang.Exception
-
getValueStringRepresentation
public java.lang.String getValueStringRepresentation()
Description copied from class:PropertyReturns value's string representation.- Overrides:
getValueStringRepresentationin classProperty- Returns:
- string "null" if property does not have value;
value. toString()if property has value.
-
getValue
public java.lang.Object[] getValue()
Description copied from class:PropertyReturns properties value.
-
clone
public ListProperty clone()
Description copied from class:PropertyClones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.
-
-