Share via


CollectionVariableContextVariableTypeConverter Class

public class CollectionVariableContextVariableTypeConverter
extends ContextVariableTypeConverter<java.util.Collection>

A ContextVariableTypeConverter<T> for java.util.Collection variables. Use ContextVariableTypes.getGlobalVariableTypeForClass(String.class) to get an instance of this class.

Constructor Summary

Constructor Description
CollectionVariableContextVariableTypeConverter()

Creates a new instance of the CollectionVariableContextVariableTypeConverter class.

CollectionVariableContextVariableTypeConverter(String delimiter)

Creates a new instance of the CollectionVariableContextVariableTypeConverter class.

Method Summary

Modifier and Type Method and Description
static ToPromptStringFunction<java.util.Collection> getString(String delimiter)

Gets a function that converts a collection to a string.

Methods inherited from ContextVariableTypeConverter

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

CollectionVariableContextVariableTypeConverter

public CollectionVariableContextVariableTypeConverter()

Creates a new instance of the CollectionVariableContextVariableTypeConverter class.

CollectionVariableContextVariableTypeConverter

public CollectionVariableContextVariableTypeConverter(String delimiter)

Creates a new instance of the CollectionVariableContextVariableTypeConverter class.

Parameters:

delimiter - The delimiter to use joining elements of the collection.

Method Details

getString

public static ContextVariableTypeConverter.ToPromptStringFunction getString(String delimiter)

Gets a function that converts a collection to a string.

Parameters:

delimiter - The delimiter to use joining elements of the collection.

Returns:

A function that converts a collection to a string.

Applies to