Package com.sap.ai.sdk.grounding.model
Class KeyValueListPair
java.lang.Object
com.sap.ai.sdk.grounding.model.KeyValueListPair
KeyValueListPair
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for KeyValueListPair. -
Method Summary
Modifier and TypeMethodDescriptionaddValueItem(String valueItem) Add one value instance to thisKeyValueListPair.static KeyValueListPair.Buildercreate()Create a type-safe, fluent-api builder object to construct a newKeyValueListPairinstance with all required arguments.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theKeyValueListPair.getKey()Get keygetValue()Get valueinthashCode()Set the key of thisKeyValueListPairinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisKeyValueListPairinstance.voidSet the key of thisKeyValueListPairinstance.voidSet the value of thisKeyValueListPairinstance.toMap()Get the value of all properties of thisKeyValueListPairinstance including unrecognized properties.toString()Set the value of thisKeyValueListPairinstance and return the same instance.
-
Constructor Details
-
KeyValueListPair
protected KeyValueListPair()Default constructor for KeyValueListPair.
-
-
Method Details
-
key
Set the key of thisKeyValueListPairinstance and return the same instance.- Parameters:
key- The key of thisKeyValueListPair- Returns:
- The same instance of this
KeyValueListPairclass
-
getKey
Get key- Returns:
- key The key of this
KeyValueListPairinstance.
-
setKey
Set the key of thisKeyValueListPairinstance.- Parameters:
key- The key of thisKeyValueListPair
-
value
Set the value of thisKeyValueListPairinstance and return the same instance.- Parameters:
value- The value of thisKeyValueListPair- Returns:
- The same instance of this
KeyValueListPairclass
-
addValueItem
Add one value instance to thisKeyValueListPair.- Parameters:
valueItem- The value that should be added- Returns:
- The same instance of type
KeyValueListPair
-
getValue
Get value- Returns:
- value The value of this
KeyValueListPairinstance.
-
setValue
Set the value of thisKeyValueListPairinstance.- Parameters:
value- The value of thisKeyValueListPair
-
getCustomFieldNames
Get the names of the unrecognizable properties of theKeyValueListPair.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisKeyValueListPairinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisKeyValueListPairinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisKeyValueListPairinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newKeyValueListPairinstance with all required arguments.
-
toMap()instead.