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(forRemoval=true)
public class AppendableValueRW<T>
extends Object
implements AppendableValue<T>, Externalizable
Deprecated, for removal: This API element is subject to removal in a future version.
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, for removal: This API element is subject to removal in a future version.Constructs an AppendableValueRW with an empty list of values.AppendableValueRW
(Collection<T> values) Deprecated, for removal: This API element is subject to removal in a future version.Constructs an AppendableValueRW with the given initial collection of values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated, for removal: This API element is subject to removal in a future version.Appends a value or a collection of values to the list.boolean
isEmpty()
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the list of values is empty.last()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the last value in the list, if present.lastMinus
(int n) Deprecated, for removal: This API element is subject to removal in a future version.Returns the value at the specified position from the end of the list, if present.void
Deprecated, for removal: This API element is subject to removal in a future version.int
size()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the size of the list of values.toString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of the list of values.values()
Deprecated, for removal: This API element is subject to removal in a future version.Returns an unmodifiable list of values.void
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
AppendableValueRW
Deprecated, for removal: This API element is subject to removal in a future version.Constructs an AppendableValueRW with the given initial collection of values.- Parameters:
values
- the initial collection of values
-
AppendableValueRW
public AppendableValueRW()Deprecated, for removal: This API element is subject to removal in a future version.Constructs an AppendableValueRW with an empty list of values.
-
-
Method Details
-
append
Deprecated, for removal: This API element is subject to removal in a future version.Appends a value or a collection of values to the list.- Parameters:
value
- the value or collection of values to append
-
values
Deprecated, for removal: This API element is subject to removal in a future version.Returns an unmodifiable list of values.- Specified by:
values
in interfaceAppendableValue<T>
- Returns:
- an unmodifiable list of values
-
isEmpty
public boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Returns the size of the list of values.- Specified by:
size
in interfaceAppendableValue<T>
- Returns:
- the size of the list of values
-
last
Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Returns a string representation of the list of values. -
writeExternal
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-