Class RXAttribute

  • Direct Known Subclasses:
    RXElement

    public class RXAttribute
    extends java.lang.Object
    The RXAttribute class represents an XML attribute by simply having a name and value. It also forms the super class of RXElement
    • Constructor Summary

      Constructors 
      Constructor Description
      RXAttribute()
      Creates an empty attribute.
      RXAttribute​(java.lang.String aName, boolean aValue)
      Creates an attribute initialized with the given name and boolean value.
      RXAttribute​(java.lang.String aName, double aValue)
      Creates an attribute initialized with the given name and float value.
      RXAttribute​(java.lang.String aName, int aValue)
      Creates an attribute initialized with the given name and int value.
      RXAttribute​(java.lang.String aName, java.lang.Boolean aValue)
      Creates an attribute initialized with the given name and Boolean value.
      RXAttribute​(java.lang.String aName, java.lang.String aValue)
      Creates an attribute initialized with the given name and value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getFloatValue()
      Returns the value for this attribute as a float.
      int getIntValue()
      Returns the value for this attribute as an int.
      java.lang.String getName()
      Returns the name for this attribute.
      java.lang.Number getNumberValue()
      Returns value for the attribute as a Number (can be any of Integer, Double, etc).
      java.lang.String getValue()
      Returns the value for this attribute.
      void setName​(java.lang.String aName)
      Sets the name for this attribute.
      void setValue​(java.lang.String aValue)
      Sets the value for this attribute.
      java.lang.String toString()
      Returns a basic string representation of this attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RXAttribute

        public RXAttribute()
        Creates an empty attribute.
      • RXAttribute

        public RXAttribute​(java.lang.String aName,
                           java.lang.String aValue)
        Creates an attribute initialized with the given name and value.
      • RXAttribute

        public RXAttribute​(java.lang.String aName,
                           boolean aValue)
        Creates an attribute initialized with the given name and boolean value.
      • RXAttribute

        public RXAttribute​(java.lang.String aName,
                           java.lang.Boolean aValue)
        Creates an attribute initialized with the given name and Boolean value.
      • RXAttribute

        public RXAttribute​(java.lang.String aName,
                           int aValue)
        Creates an attribute initialized with the given name and int value.
      • RXAttribute

        public RXAttribute​(java.lang.String aName,
                           double aValue)
        Creates an attribute initialized with the given name and float value.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name for this attribute.
      • setName

        public void setName​(java.lang.String aName)
        Sets the name for this attribute.
      • getValue

        public java.lang.String getValue()
        Returns the value for this attribute.
      • setValue

        public void setValue​(java.lang.String aValue)
        Sets the value for this attribute.
      • getIntValue

        public int getIntValue()
        Returns the value for this attribute as an int.
      • getFloatValue

        public float getFloatValue()
        Returns the value for this attribute as a float.
      • getNumberValue

        public java.lang.Number getNumberValue()
        Returns value for the attribute as a Number (can be any of Integer, Double, etc).
      • toString

        public java.lang.String toString()
        Returns a basic string representation of this attribute.
        Overrides:
        toString in class java.lang.Object