Class ArrayValue<T extends BaseValue>

java.lang.Object
io.camunda.zeebe.msgpack.value.BaseValue
io.camunda.zeebe.msgpack.value.ArrayValue<T>
All Implemented Interfaces:
Recyclable, Iterable<T>, Iterator<T>

public final class ArrayValue<T extends BaseValue> extends BaseValue implements Iterator<T>, Iterable<T>
  • Constructor Details

    • ArrayValue

      public ArrayValue(T innerValue)
  • Method Details

    • reset

      public void reset()
      Specified by:
      reset in interface Recyclable
    • isEmpty

      public boolean isEmpty()
    • writeJSON

      public void writeJSON(StringBuilder builder)
      Specified by:
      writeJSON in class BaseValue
    • write

      public void write(MsgPackWriter writer)
      Specified by:
      write in class BaseValue
    • read

      public void read(MsgPackReader reader)
      Specified by:
      read in class BaseValue
    • getEncodedLength

      public int getEncodedLength()
      Specified by:
      getEncodedLength in class BaseValue
    • iterator

      public Iterator<T> iterator()
      Please be aware that iterating over an ArrayValue is not thread-safe. Iterating over this will modify the buffer. Multiple threads iterating over the same object will result in exceptions!
      Specified by:
      iterator in interface Iterable<T extends BaseValue>
      Returns:
      an iterator for this object
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T extends BaseValue>
    • next

      public T next()
      Please be aware that iterating over an ArrayValue is not thread-safe. Iterating over this will modify the buffer. Multiple threads iterating over the same object will result in exceptions!
      Specified by:
      next in interface Iterator<T extends BaseValue>
      Returns:
      the next element
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T extends BaseValue>
    • add

      public T add()
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object