Class AttrAccept

  • All Implemented Interfaces:
    java.lang.Comparable

    final class AttrAccept
    extends AbstractAttr<java.lang.String>
    Data type representing the getValue of the accept attribute of the bosh element.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String[] encodings
      Array of the accepted encodings.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AttrAccept​(java.lang.String val)
      Creates a new attribute object.
    • Field Detail

      • encodings

        private final java.lang.String[] encodings
        Array of the accepted encodings.
    • Constructor Detail

      • AttrAccept

        private AttrAccept​(java.lang.String val)
        Creates a new attribute object.
        Parameters:
        val - attribute getValue
        Throws:
        BOSHException - on parse or validation failure
    • Method Detail

      • createFromString

        static AttrAccept createFromString​(java.lang.String str)
                                    throws BOSHException
        Creates a new attribute instance from the provided String.
        Parameters:
        str - string representation of the attribute
        Returns:
        attribute instance or null if provided string is null
        Throws:
        BOSHException - on parse or validation failure
      • isAccepted

        boolean isAccepted​(java.lang.String name)
        Determines whether or not the specified encoding is supported.
        Parameters:
        name - encoding name