Class Selector

java.lang.Object
com.isode.dsapi.syntax.Selector
All Implemented Interfaces:
Comparable<Selector>

public class Selector extends Object implements Comparable<Selector>
This class stores information about a presentation address selector in the following formats: HEX and IA5.

This is an immutable class.

Examples:

"abc"

"ABC+123"

'00FF'H

'ab0a'H

Future enhancements:

  1. Support US GOSIP format.
Since:
15.0
Author:
mv
  • Constructor Details

    • Selector

      public Selector(Selector.SelectorType type, String value) throws BadValueException
      Constructor to create an object with the given data.
      Parameters:
      type - Type of the selector.
      value - Value of the selector.
      Throws:
      BadValueException - if any of the input is invalid.
    • Selector

      public Selector(String str) throws BadValueException
      Constructor to create an object with the given data.
      Parameters:
      str - String representation of the selector.
      Throws:
      BadValueException - if the input is invalid.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public String getValue()
      Returns the value of the selector.
      Returns:
      Value of the selector.
    • getType

      public Selector.SelectorType getType()
      Returns the type of the selector.
      Returns:
      Type of the selector.
    • getDisplayString

      public String getDisplayString()
      Returns string form to display.
      Returns:
      String form to display.
    • getCanonicalForm

      public Selector getCanonicalForm()
      The value is converted to lower case for Selector type HEX.
      Returns:
      canonical form of object.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Selector o)
      Specified by:
      compareTo in interface Comparable<Selector>