Class AppendableValueRW<T>

java.lang.Object
org.bsc.langgraph4j.state.AppendableValueRW<T>
Type Parameters:
T - the type of the value
All Implemented Interfaces:
Externalizable, Serializable, AppendableValue<T>

@Deprecated public class AppendableValueRW<T> extends Object implements AppendableValue<T>, Externalizable
Deprecated.
A class that implements the AppendableValue interface and provides functionality to append values to a list and retrieve various properties of the list.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Constructs an AppendableValueRW with an empty list of values.
    Deprecated.
    Constructs an AppendableValueRW with the given initial collection of values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(Object value)
    Deprecated.
    Appends a value or a collection of values to the list.
    boolean
    Deprecated.
    Checks if the list of values is empty.
    Deprecated.
    Returns the last value in the list, if present.
    lastMinus(int n)
    Deprecated.
    Returns the value at the specified position from the end of the list, if present.
    void
    Deprecated.
     
    int
    Deprecated.
    Returns the size of the list of values.
    Deprecated.
    Returns a string representation of the list of values.
    Deprecated.
    Returns an unmodifiable list of values.
    void
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AppendableValueRW

      public AppendableValueRW(Collection<T> values)
      Deprecated.
      Constructs an AppendableValueRW with the given initial collection of values.
      Parameters:
      values - the initial collection of values
    • AppendableValueRW

      public AppendableValueRW()
      Deprecated.
      Constructs an AppendableValueRW with an empty list of values.
  • Method Details

    • append

      public void append(Object value)
      Deprecated.
      Appends a value or a collection of values to the list.
      Parameters:
      value - the value or collection of values to append
    • values

      public List<T> values()
      Deprecated.
      Returns an unmodifiable list of values.
      Specified by:
      values in interface AppendableValue<T>
      Returns:
      an unmodifiable list of values
    • isEmpty

      public boolean isEmpty()
      Deprecated.
      Checks if the list of values is empty.
      Specified by:
      isEmpty in interface AppendableValue<T>
      Returns:
      true if the list of values is empty, false otherwise
    • size

      public int size()
      Deprecated.
      Returns the size of the list of values.
      Specified by:
      size in interface AppendableValue<T>
      Returns:
      the size of the list of values
    • last

      public Optional<T> last()
      Deprecated.
      Returns the last value in the list, if present.
      Specified by:
      last in interface AppendableValue<T>
      Returns:
      an Optional containing the last value if present, otherwise an empty Optional
    • lastMinus

      public Optional<T> lastMinus(int n)
      Deprecated.
      Returns the value at the specified position from the end of the list, if present.
      Specified by:
      lastMinus in interface AppendableValue<T>
      Parameters:
      n - the position from the end of the list
      Returns:
      an Optional containing the value at the specified position if present, otherwise an empty Optional
    • toString

      public String toString()
      Deprecated.
      Returns a string representation of the list of values.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the list of values
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Deprecated.
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Deprecated.
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException