Enum IQ.Type

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IQ.Type>
    Enclosing class:
    IQ

    public static enum IQ.Type
    extends java.lang.Enum<IQ.Type>
    A enum to represent the type of the IQ stanza.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      error
      The IQ stanza reports an error that has occurred regarding processing or delivery of a get or set request.
      get
      The IQ stanza requests information, inquires about what data is needed in order to complete further operations, etc.
      result
      The IQ stanza is a response to a successful get or set request.
      set
      The IQ stanza provides data that is needed for an operation to be completed, sets new values, replaces existing values, etc.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IQ.Type fromString​(java.lang.String string)
      Converts a String into the corresponding types.
      static IQ.Type valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IQ.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • get

        public static final IQ.Type get
        The IQ stanza requests information, inquires about what data is needed in order to complete further operations, etc.
      • set

        public static final IQ.Type set
        The IQ stanza provides data that is needed for an operation to be completed, sets new values, replaces existing values, etc.
      • result

        public static final IQ.Type result
        The IQ stanza is a response to a successful get or set request.
      • error

        public static final IQ.Type error
        The IQ stanza reports an error that has occurred regarding processing or delivery of a get or set request.
    • Method Detail

      • values

        public static IQ.Type[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IQ.Type c : IQ.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IQ.Type valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • fromString

        public static IQ.Type fromString​(java.lang.String string)
        Converts a String into the corresponding types. Valid String values that can be converted to types are: "get", "set", "result", and "error".
        Parameters:
        string - the String value to covert.
        Returns:
        the corresponding Type.
        Throws:
        java.lang.IllegalArgumentException - when not able to parse the string parameter
        java.lang.NullPointerException - if the string is null