Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.face
Class AttributeValue

    java.lang.Object
      com.pietschy.command.face.AttributeValue

Direct Known Subclasses:
  DescriptionAttributeValue

    public class AttributeValue

extends java.lang.Object

AttributeValues manage the value of a specific `Attribute` of a `Face`.

Constructor Summary
`AttributeValue(Face face, Attribute attr)` Creates a new attribute for the specified face with the specified name.

Method Summary
`void` | `copyTo(AttributeValue target)` Copies this attributes value to the specified attribute.
`protected Face` | `getFace()` Gets the face to which this attribute belongs.
`protected java.lang.Object` | `getInheritedValue()` Gets the inherited value of the attribute.
`java.lang.Object` | `getValue()` Gets the value of this attribute.
`boolean` | `isInherited()` Checks if the value is inherited.
`(package private) boolean` | `isNullValue()` Checks if this attributes value is null.
`(package private) void` | `notifyParentAttributeChanged(Attribute parentAttribute, java.lang.Object oldValue, java.lang.Object newValue)` Invoked to notify this attribute that the same attribute on the face's parent has changed.
`void` | `setInherited(boolean inherit)` Configures this attribute to inherit when `null`.
`void` | `setValue(java.lang.Object value)` Sets the value of the attribute.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AttributeValue

    AttributeValue(Face face,
                   Attribute attr)

  Creates a new attribute for the specified face with the specified name.

  Parameters:
    `face` - the face to which the attribute belongs.
    `attr` - the attribute name.

Method Detail

### copyTo

    public void copyTo(AttributeValue target)

  Copies this attributes value to the specified attribute.

  Parameters:
    `target` - the attribute to copy to.

### getValue

    public java.lang.Object getValue()

  Gets the value of this attribute.

  Returns:
    the value of this attribute or the inherited value as required.

### getInheritedValue

    protected java.lang.Object getInheritedValue()

  Gets the inherited value of the attribute.

  Returns:
    the inherited value of the attribute.

### setValue

    public void setValue(java.lang.Object value)

  Sets the value of the attribute.

  Parameters:
    `value` - the new value of the attribute.

### isInherited

    public boolean isInherited()

  Checks if the value is inherited.

  Returns:
    `true` if the value will inherit when `null`, `false` otherwise.

### setInherited

    public void setInherited(boolean inherit)

  Configures this attribute to inherit when `null`.

  Parameters:
    `inherit` - `true` to inherit when `null`, `false` otherwise.

### getFace

    protected Face getFace()

  Gets the face to which this attribute belongs.

  Returns:
    the face to which this attribute belongs.

### notifyParentAttributeChanged

    void notifyParentAttributeChanged(Attribute parentAttribute,
                                      java.lang.Object oldValue,
                                      java.lang.Object newValue)

  Invoked to notify this attribute that the same attribute on the face's parent has changed.

  Parameters:
    `parentAttribute` - the attribute of the faces parent.
    `oldValue` - the old value
    `newValue` - the new value.

### isNullValue

    boolean isNullValue()

  Checks if this attributes value is null.

  Returns:
    `true` if the value is `null`, `false` otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch