Class ConfDottedQuad

All Implemented Interfaces:
Serializable, Cloneable, Comparable<ConfDottedQuad>

public class ConfDottedQuad extends ConfValue implements Comparable<ConfDottedQuad>
DATA_CONTAINER - Corresponds to the YANG dotted-quad type.
    type string {
      pattern
          '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
        + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
      }
    }
 
An unsigned 32-bit number expressed in the dotted-quad notation, i.e., four octets written as decimal numbers and separated with the '.' (full stop) character.";
See Also:
  • Constructor Details

    • ConfDottedQuad

      public ConfDottedQuad(String str) throws ConfException
      Construct a ConfDottedQuad from a string of bytes in the format of octets (decimal values) separated with dots.
      Throws:
      ConfException
    • ConfDottedQuad

      public ConfDottedQuad(byte[] val) throws ConfException
      Throws:
      ConfException
    • ConfDottedQuad

      public ConfDottedQuad(byte q1, byte q2, byte q3, byte q4)
      Constructs a ConfdDottedQuad from 4 bytes.
      Parameters:
      q1 - First byte of quad.
      q2 - Second byte of quad.
      q3 - Third byte of quad.
      q4 - Fourth byte of quad.
    • ConfDottedQuad

      public ConfDottedQuad(ConfBinary obj) throws ConfException
      Constructs a ConfDottedQuad from a ConfBinary object.
      Throws:
      ConfException
    • ConfDottedQuad

      public ConfDottedQuad(ConfEObject o) throws ConfException
      Throws:
      ConfException
  • Method Details

    • toString

      public String toString()
      Format a dottedQuad as octets separated with dots, as for example: "1.2.4.192"
      Specified by:
      toString in class ConfValue
      Returns:
      the printable representation of the object.
    • compareTo

      public int compareTo(ConfDottedQuad o)
      Specified by:
      compareTo in interface Comparable<ConfDottedQuad>
    • equals

      public boolean equals(Object o)
      Description copied from class: ConfValue
      Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal.
      Specified by:
      equals in class ConfValue
      Parameters:
      o - The object to compare to.
      Returns:
      true if the objects are identical.
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class ConfValue
    • encode

      public ConfEObject encode()
      Description copied from class: ConfValue
      encode value.
      Specified by:
      encode in class ConfValue