public class IDMap extends Object
Flagged
,
DefaultSource
,
Defaults
Constructor and Description |
---|
IDMap(List ids,
Map byShortFlag,
Map byLongFlag)
Creates a new IDMap.
|
Modifier and Type | Method and Description |
---|---|
String |
getIDByLongFlag(String s)
Returns the unique ID of the parameter with the specified long flag, or
null if the specified long flag is not defined in this IDMap.
|
String |
getIDByShortFlag(char c)
Returns the unique ID of the parameter with the specified short flag, or
null if the specified short flag is not defined in this IDMap.
|
String |
getIDByShortFlag(Character c)
Returns the unique ID of the parameter with the specified short flag, or
null if the specified short flag is not defined in this IDMap.
|
boolean |
idExists(String id)
Returns true if the specified ID is stored in this IDMap, false if not.
|
Iterator |
idIterator()
Returns an Iterator over all parameter IDs stored in this IDMap.
|
public IDMap(List ids, Map byShortFlag, Map byLongFlag)
ids
- a List of the unique IDs of all the parameters to store
in this IDMap.byShortFlag
- a Map with keys equal to the short flags of the
parameters (as Character objects),
and values equal to the unique IDs of the parameters associated with
those short flags.byLongFlag
- a Map with keys equal to the long flags of the
parameters (as Strings),
and values equal to the unique IDs of the parameters associated with
those short flags.public Iterator idIterator()
Iterator
public boolean idExists(String id)
id
- the id to search for in this IDMappublic String getIDByShortFlag(Character c)
c
- the short flag to search for in this IDMap.public String getIDByShortFlag(char c)
c
- the short flag to search for in this IDMap.public String getIDByLongFlag(String s)
s
- the long flag to search for in this IDMap.Copyright © 2015. All rights reserved.