org.swixml

## Class Attribute

- java.lang.Object
- - org.swixml.Attribute

-     public class Attribute
      extends Object

  Class for store attribute info.
  Author:
    Alex Buloichik

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `name` Attribute name.
    `protected String` | `value` Attribute value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Attribute(String name, String value)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Attribute` | `getAttribute(Element elem, String attrName)` Create class instance by name from element.
    `static String` | `getAttributeValue(Element elem, String attrName)` Get attribute value from element.
    `String` | `getName()`
    `String` | `getValue()`
    `void` | `setValue(String value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### name

          protected final String name

      Attribute name.

    - #### value

          protected String value

      Attribute value.

  - ### Constructor Detail

    - #### Attribute

          public Attribute(String name,
                   String value)

      Constructor.

  - ### Method Detail

    - #### getName

          public String getName()

    - #### getValue

          public String getValue()

    - #### setValue

          public void setValue(String value)

    - #### getAttribute

          public static Attribute getAttribute(Element elem,
                               String attrName)

      Create class instance by name from element.
      Parameters:
        `elem` - element for find attribute
        `attrName` - attribute name
      Returns:
        object or null if attribute doesn't declared in element

    - #### getAttributeValue

          public static String getAttributeValue(Element elem,
                                 String attrName)

      Get attribute value from element.
      Parameters:
        `elem` - element for find attribute
        `attrName` - attribute name
      Returns:
        attribute value or null if attribute doesn't declared in element

Copyright © 2002 - 2013 - Wolf Paulus - wolfpaulus.com. All rights reserved.