Package org.bsc.langgraph4j.state
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
ConstructorDescriptionDeprecated.Constructs an AppendableValueRW with an empty list of values.AppendableValueRW
(Collection<T> values) Deprecated.Constructs an AppendableValueRW with the given initial collection of values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Appends a value or a collection of values to the list.boolean
isEmpty()
Deprecated.Checks if the list of values is empty.last()
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
size()
Deprecated.Returns the size of the list of values.toString()
Deprecated.Returns a string representation of the list of values.values()
Deprecated.Returns an unmodifiable list of values.void
Deprecated.
-
Constructor Details
-
AppendableValueRW
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
Deprecated.Appends a value or a collection of values to the list.- Parameters:
value
- the value or collection of values to append
-
values
Deprecated.Returns an unmodifiable list of values.- Specified by:
values
in interfaceAppendableValue<T>
- Returns:
- an unmodifiable list of values
-
isEmpty
public boolean isEmpty()Deprecated.Checks if the list of values is empty.- Specified by:
isEmpty
in interfaceAppendableValue<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 interfaceAppendableValue<T>
- Returns:
- the size of the list of values
-
last
Deprecated.Returns the last value in the list, if present.- Specified by:
last
in interfaceAppendableValue<T>
- Returns:
- an Optional containing the last value if present, otherwise an empty Optional
-
lastMinus
Deprecated.Returns the value at the specified position from the end of the list, if present.- Specified by:
lastMinus
in interfaceAppendableValue<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
Deprecated.Returns a string representation of the list of values. -
writeExternal
Deprecated.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
Deprecated.- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-