Enum Class ChunkedToXContentHelper

java.lang.Object
java.lang.Enum<ChunkedToXContentHelper>
org.elasticsearch.common.xcontent.ChunkedToXContentHelper
All Implemented Interfaces:
Serializable, Comparable<ChunkedToXContentHelper>, Constable

public enum ChunkedToXContentHelper extends Enum<ChunkedToXContentHelper>
  • Method Details

    • values

      public static ChunkedToXContentHelper[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChunkedToXContentHelper valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • startObject

      public static Iterator<ToXContent> startObject()
    • startObject

      public static Iterator<ToXContent> startObject(String name)
    • endObject

      public static Iterator<ToXContent> endObject()
    • startArray

      public static Iterator<ToXContent> startArray()
    • startArray

      public static Iterator<ToXContent> startArray(String name)
    • endArray

      public static Iterator<ToXContent> endArray()
    • field

      public static Iterator<ToXContent> field(String name, boolean value)
    • field

      public static Iterator<ToXContent> field(String name, long value)
    • field

      public static Iterator<ToXContent> field(String name, String value)
    • singleChunk

      public static Iterator<ToXContent> singleChunk(ToXContent item)
      Creates an Iterator of a single ToXContent object that serializes the given object as a single chunk. Just wraps Iterators.single(T), but still useful because it avoids any type ambiguity.
      Parameters:
      item - Item to wrap
      Returns:
      Singleton iterator for the given item.