Enum HttpHeaderValue

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<HttpHeaderValue>

    public enum HttpHeaderValue
    extends java.lang.Enum<HttpHeaderValue>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asString()  
      static boolean hasKnownValues​(HttpHeader header)  
      boolean is​(java.lang.String s)  
      static boolean parseCsvIndex​(java.lang.String value, java.util.function.Function<HttpHeaderValue,​java.lang.Boolean> found)
      Parse an unquoted comma separated list of index keys.
      static boolean parseCsvIndex​(java.lang.String value, java.util.function.Function<HttpHeaderValue,​java.lang.Boolean> found, java.util.function.Function<java.lang.String,​java.lang.Boolean> unknown)
      Parse an unquoted comma separated list of index keys.
      java.nio.ByteBuffer toBuffer()  
      java.lang.String toString()  
      static HttpHeaderValue valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static HttpHeaderValue[] 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, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static HttpHeaderValue[] 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 (HttpHeaderValue c : HttpHeaderValue.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HttpHeaderValue 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
      • toBuffer

        public java.nio.ByteBuffer toBuffer()
      • is

        public boolean is​(java.lang.String s)
      • asString

        public java.lang.String asString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<HttpHeaderValue>
      • hasKnownValues

        public static boolean hasKnownValues​(HttpHeader header)
      • parseCsvIndex

        public static boolean parseCsvIndex​(java.lang.String value,
                                            java.util.function.Function<HttpHeaderValue,​java.lang.Boolean> found)
        Parse an unquoted comma separated list of index keys.
        Parameters:
        value - A string list of index keys, separated with commas and possible white space
        found - The function to call for all found index entries. If the function returns false parsing is halted.
        Returns:
        true if parsing completed normally and all found index items returned true from the found function.
      • parseCsvIndex

        public static boolean parseCsvIndex​(java.lang.String value,
                                            java.util.function.Function<HttpHeaderValue,​java.lang.Boolean> found,
                                            java.util.function.Function<java.lang.String,​java.lang.Boolean> unknown)
        Parse an unquoted comma separated list of index keys.
        Parameters:
        value - A string list of index keys, separated with commas and possible white space
        found - The function to call for all found index entries. If the function returns false parsing is halted.
        unknown - The function to call for foound unknown entries. If the function returns false parsing is halted.
        Returns:
        true if parsing completed normally and all found index items returned true from the found function.