Class StructuredFieldItem

java.lang.Object
org.apache.hc.core5.http.structured.StructuredFieldItem
All Implemented Interfaces:
StructuredFieldMember, StructuredFieldValue

@Contract(threading=IMMUTABLE) public final class StructuredFieldItem extends Object implements StructuredFieldValue, StructuredFieldMember
Immutable Structured Field Item.
Since:
5.5
  • Method Details

    • of

      public static StructuredFieldItem of(StructuredFieldBareItem bareItem)
      Creates an Item without parameters.
      Parameters:
      bareItem - the bare Item value.
      Returns:
      the immutable Item.
    • ofInteger

      public static StructuredFieldItem ofInteger(long value)
      Parameters:
      value - the Integer value.
      Returns:
      an Integer Item without parameters.
    • ofDecimal

      public static StructuredFieldItem ofDecimal(BigDecimal value)
      Parameters:
      value - the Decimal value.
      Returns:
      a Decimal Item without parameters.
    • ofString

      public static StructuredFieldItem ofString(String value)
      Parameters:
      value - the printable ASCII String value.
      Returns:
      a String Item without parameters.
    • ofToken

      public static StructuredFieldItem ofToken(String value)
      Parameters:
      value - the Token value.
      Returns:
      a Token Item without parameters.
    • ofByteSequence

      public static StructuredFieldItem ofByteSequence(byte[] value)
      Parameters:
      value - the Byte Sequence value.
      Returns:
      a Byte Sequence Item without parameters.
    • ofBoolean

      public static StructuredFieldItem ofBoolean(boolean value)
      Parameters:
      value - the Boolean value.
      Returns:
      a Boolean Item without parameters.
    • ofDate

      public static StructuredFieldItem ofDate(long epochSeconds)
      Parameters:
      epochSeconds - seconds since the Unix epoch.
      Returns:
      a Date Item without parameters.
    • ofDisplayString

      public static StructuredFieldItem ofDisplayString(String value)
      Parameters:
      value - the Unicode Display String value.
      Returns:
      a Display String Item without parameters.
    • of

      public static StructuredFieldItem of(StructuredFieldBareItem bareItem, StructuredFieldParameters parameters)
      Creates an Item with parameters.
      Parameters:
      bareItem - the bare Item value.
      parameters - the ordered parameters.
      Returns:
      the immutable Item.
    • getBareItem

      public StructuredFieldBareItem getBareItem()
      Returns:
      the bare Item value.
    • getParameters

      public StructuredFieldParameters getParameters()
      Specified by:
      getParameters in interface StructuredFieldMember
      Returns:
      the ordered parameters associated with this member.
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object