|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.attribute.AttributeFactory
The abstract base class defining the methods needed to build an
AttributeFactory. This factory produces new
Attribute, AttributeSet and
AttributeList instances.
| Constructor Summary | |
AttributeFactory()
Default constructor. |
|
| Method Summary | |
abstract Attribute |
immutableAttribute(Attribute attribute)
Returns a wrapper Attribute instance that turns the
Attribute given by attribute into an
immutable one, though the method Attribute.isMutable() will
still return the value of the wrapped attribute.
|
abstract AttributeSet |
immutableAttributeSet(AttributeSet set)
Returns a wrapper AttributeSet instance that turns the
AttributeSet given by set into an immutable
one. |
abstract Attribute |
newAttribute(java.lang.String name,
java.lang.Object value)
This method returns an Attribute with given name and
value. |
abstract Attribute |
newAttribute(java.lang.String name,
java.lang.Object value,
Constraint constraint)
This method return an Attribute with given name,
value and constraint. |
abstract AttributeList |
newAttributeList()
This method return an AttributeList. |
abstract AttributeSet |
newAttributeSet()
This method returns an AttributeSet. |
static AttributeFactory |
newInstance()
This method creates a new instance of an AttributeFactory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributeFactory()
| Method Detail |
public abstract Attribute newAttribute(java.lang.String name,
java.lang.Object value)
throws IllegalNameException,
IllegalValueException,
ConstraintViolationException
name and
value.
name - the name for the Attribute.value - the value of the Attribute.
IllegalNameException - thrown if the name is illegal.
IllegalValueException - thrown if the value is illegal.
ConstraintViolationException - thrown if the constraint of
this attribute does not permit the new value.
public abstract Attribute newAttribute(java.lang.String name,
java.lang.Object value,
Constraint constraint)
throws IllegalNameException,
IllegalValueException,
ConstraintViolationException
name,
value and constraint.
name - the name for the Attribute.value - the value of the Attribute.constraint - a Constraint for the
Attribute.
IllegalNameException
IllegalValueException
ConstraintViolationExceptionpublic abstract AttributeSet newAttributeSet()
AttributeSet.
AttributeSetpublic abstract AttributeList newAttributeList()
AttributeList.
AttributeListpublic abstract Attribute immutableAttribute(Attribute attribute)
Returns a wrapper Attribute instance that turns the
Attribute given by attribute into an
immutable one, though the method Attribute.isMutable() will
still return the value of the wrapped attribute.
This method allows to provide users with "read-only"
Attributes.
Attemps to modifiy the wrapper Attribute instance result in
an DynamicException.
Notice:Only those Attributes whose values are
cloneable can be turned into an immutable Attribute.
attribute - the Attribute to make immutable
Attribute instancepublic abstract AttributeSet immutableAttributeSet(AttributeSet set)
Returns a wrapper AttributeSet instance that turns the
AttributeSet given by set into an immutable
one. This method allows to provide users with "read-only"
AttributeSets.
Attemps to modifiy the wrapper AttributeSet instance result
in an DynamicException.
set - the AttributeSet to make immutable
AttributeSet
instancepublic static AttributeFactory newInstance()
AttributeFactory.
AttributeFactory instance.
FactoryConfigurationError - is thrown whenever
something goes wrong. For instance, there is no factory
classname found or the factory class itself is not found or
not accessable.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||