public class SlotTypeHelper extends Object
Constructor and Description |
---|
SlotTypeHelper() |
Modifier and Type | Method and Description |
---|---|
SlotType1 |
create(String slotName,
List<String> slotValues,
String slotType)
This is a convenience method to create a SlotType1 object with the List of values
|
SlotType1 |
create(String slotName,
String slotValue,
String slotType)
This is a convenience method to create a SlotType1 object with the provided value
|
List<Date> |
getDateValues(SlotType1 slot)
This is a convenience method that will get the values from a SlotType1
|
Map<String,SlotType1> |
getNameSlotMap(List<SlotType1> slots)
This is a convenience method that will iterate through the List of SlotType1 provided and
return a SlotType1 name to SlotType1 mapping If multiple slots share the same name, the last
one will be stored in the map
|
Map<String,List<SlotType1>> |
getNameSlotMapDuplicateSlotNamesAllowed(List<SlotType1> slots)
This is a convenience method that will iterate through the List of SlotType1 provided and
return a mapping of SlotType1 name to a List of SlotType1s * If multiple slots share the same
name they will be added to the list
|
SlotType1 |
getSlotByName(String name,
List<SlotType1> slots)
This is a convenience method that searches the List of SlotType1 provided and returns the
SlotType1 matching the provided name
|
List<String> |
getStringValues(SlotType1 slot)
This is a convenience method that will get the values from a SlotType1
|
public SlotType1 getSlotByName(String name, List<SlotType1> slots)
name
- the name of the slot to be returnedslots
- the List of SlotType1 to be searched, not nullpublic Map<String,SlotType1> getNameSlotMap(List<SlotType1> slots)
slots
- the list of SlotType1s to be mapped, null returns empty mappublic Map<String,List<SlotType1>> getNameSlotMapDuplicateSlotNamesAllowed(List<SlotType1> slots)
slots
- the list of SlotType1s to be mapped, null returns empty mappublic List<String> getStringValues(SlotType1 slot)
slot
- the SlotType1 to get the values from, null returns empty Listpublic List<Date> getDateValues(SlotType1 slot)
slot
- the SlotType1 to get the values from, null returns empty Listpublic SlotType1 create(String slotName, String slotValue, String slotType)
slotName
- the name of the slot, empty SlotType1 if nullslotValue
- the value to setslotType
- the slot type of the slotpublic SlotType1 create(String slotName, List<String> slotValues, String slotType)
slotName
- the name of the slot, empty SlotType1 if nullslotValues
- the value to setslotType
- the slot type of the slotThis work is licensed under a Creative Commons Attribution 4.0 International License.