Package org.harctoolbox.girr
Interface Named
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Command,CommandSet,Remote
This interface describes something that has a name, using the usual semantics.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classClass containing a Comparator implementing standard alphabetical, case insensitive order.static classClass containing a Comparator implementing standard alphabetical, case sensitive order. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Return the name of the object.static <T extends Named>
voidpopulateMap(Map<String, T> map, Collection<T> collection) Populate the map as first argument with the elements contained in the Collection in the second argument.toList(T thing) Generate a Map<String, T> map containing one element, the argument.toMap(Collection<T> collection) Create a Map<String, T> and populate with the elements of the second argument.toMap(T thing) Generate a Map<String, T> map containing one element, the argument.
-
Method Details
-
toMap
Generate a Map<String, T> map containing one element, the argument.- Type Parameters:
T- type extending Named- Parameters:
thing-- Returns:
- Map<String, T>
-
toList
Generate a Map<String, T> map containing one element, the argument.- Type Parameters:
T-- Parameters:
thing-- Returns:
- Map<String, T>
-
populateMap
Populate the map as first argument with the elements contained in the Collection in the second argument.- Type Parameters:
T-- Parameters:
map-collection-
-
toMap
Create a Map<String, T> and populate with the elements of the second argument.- Type Parameters:
T-- Parameters:
collection- Collection of Ts.- Returns:
-
getName
String getName()Return the name of the object.- Returns:
-