Package overit.geocall.util
Interface Getter
- All Known Implementing Classes:
CxfMode,HashGetter,PropertyGetter,SensibleHashGetter,SerialGetter,StringGetter,UIMessage.ControlValues,WebParameters,XMLTree
public interface Getter
Interface that defines a generic collecting tool, that must be implemented by the objects that wants to store informations
that in this way becomes easy to extract, or can be used to property setup.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Checks if the generic container contains an entry with the key passed as parameterExtracts from the generic container the object that corresponds to the key passed as parameters.Extracts from the generic container the object that corresponds to the key passed as parameters.booleangetboolean(String key, boolean def) Extracts a boolean from the generic containergetBoolean(String key, Boolean def) Extracts a Boolean from the generic containergetDate(String key, Date def, SimpleDateFormat sdf) Extracts a Date from the generic container.doubleExtracts a double from the generic containerExtracts a Double from the generic containerfloatExtracts a float from the generic containerExtracts a Float from the generic containerintExtracts a int from the generic containergetInteger(String key, Integer def) Extracts a Integer from the generic containerlongExtracts a long from the generic containerExtracts a Long from the generic containerExtracts a string from the generic containerExtracts an Iterator used to iterate over all the generic container elements
-
Method Details
-
getString
Extracts a string from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getBoolean
Extracts a Boolean from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getboolean
Extracts a boolean from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getLong
Extracts a Long from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getlong
Extracts a long from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getInteger
Extracts a Integer from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getint
Extracts a int from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getFloat
Extracts a Float from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getfloat
Extracts a float from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getDouble
Extracts a Double from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getdouble
Extracts a double from the generic container- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekey- Returns:
- The object of the specified type, or the default one
-
getDate
Extracts a Date from the generic container. The Date must meet the characteristics of the specified SimpleDateFormat- Parameters:
key- Name of the object to extractdef- Default value returned when there isn't a correct object that corresponds to thekeysdf- The SimpleDateFormat that defines the format of the date to extract- Returns:
- The object of the specified type, or the default one
-
keyIterator
Iterator keyIterator()Extracts an Iterator used to iterate over all the generic container elements- Returns:
- The iterator on the elements of the generic container
-
get
Extracts from the generic container the object that corresponds to the key passed as parameters. In this case there isn't a default value.- Parameters:
key- The name of thekey- Returns:
- The object associated to the key passed as parameter, or null if the container contains no mapping for the
key
-
get
Extracts from the generic container the object that corresponds to the key passed as parameters. If the object is null, or if the container contains no mapping for the key, the default object is returned- Parameters:
key- The name of thekeydef- The default value returned if the extracted object is null or the key is not present in the container- Returns:
- The object associated to the key passed as parameter, or the default one
-
containsKey
Checks if the generic container contains an entry with the key passed as parameter- Parameters:
key- The name of the key to search- Returns:
- true if there is an entry with the key passed as parameter, false otherwise
-