Class StringVariableContextVariableTypeConverter
- java.lang.Object
-
- com.microsoft.semantickernel.contextvariables.ContextVariableTypeConverter<String>
-
- com.microsoft.semantickernel.contextvariables.converters.StringVariableContextVariableTypeConverter
-
public class StringVariableContextVariableTypeConverter extends ContextVariableTypeConverter<String>
AContextVariableTypeConverterforjava.lang.Stringvariables. UseContextVariableTypes.getGlobalVariableTypeForClass(String.class)to get an instance of this class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microsoft.semantickernel.contextvariables.ContextVariableTypeConverter
ContextVariableTypeConverter.Builder<T>, ContextVariableTypeConverter.Converter<T,U>, ContextVariableTypeConverter.DefaultConverter<T,U>, ContextVariableTypeConverter.NoopConverter<T>, ContextVariableTypeConverter.ToPromptStringFunction<T>
-
-
Constructor Summary
Constructors Constructor Description StringVariableContextVariableTypeConverter()Creates a new instance of theStringVariableContextVariableTypeConverterclass.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconvertToString(Object s)Converts the specified object to a string.-
Methods inherited from class com.microsoft.semantickernel.contextvariables.ContextVariableTypeConverter
builder, escapeXmlString, fromObject, fromPromptString, getType, toObject, toObject, toPromptString
-
-
-
-
Constructor Detail
-
StringVariableContextVariableTypeConverter
public StringVariableContextVariableTypeConverter()
Creates a new instance of theStringVariableContextVariableTypeConverterclass.
-
-
Method Detail
-
convertToString
@Nullable public static String convertToString(@Nullable Object s)
Converts the specified object to a string. Has special handling forContextVariableobjects and for objects that look like an object reference- Parameters:
s- the object to convert- Returns:
- the string representation of the object, or
nullif the object cannot be converted to a string or is an object reference.
-
-