Class UsageInfo
-
- All Implemented Interfaces:
public class UsageInfo
This class embeds name/value pair properties in a
HashMap
and is part of a UsageRecord.
-
-
Constructor Summary
Constructors Constructor Description UsageInfo(Map<String, String> infoValues)
Constructs an instance with a HashMap
.
-
Method Summary
Modifier and Type Method Description UsageInfo
setValue(@NonNull() String name, @NonNull() String value)
Stores a name value pair. UsageInfo
setValues(@NonNull() Map<String, String> infoValues)
Sets values by passing in the embedded HashMap
obtained via getValues that has contents filled or changed outside and prior to this method call.String
getValue(@NonNull() String name)
Retrieves the value associated with the given name. Map<String, String>
getValues()
Returns the embedded map. -
-
Method Detail
-
setValue
@NonNull() UsageInfo setValue(@NonNull() String name, @NonNull() String value)
Stores a name value pair.
- Parameters:
name
- a non-null/empty
string used as the key for theHashMap
value
- a non-null/empty
value associated withname
- Returns:
This instance.
-
setValues
@NonNull() UsageInfo setValues(@NonNull() Map<String, String> infoValues)
Sets values by passing in the embedded
HashMap
obtained via getValues that has contents filled or changed outside and prior to this method call.- Parameters:
infoValues
- theHashMap
previously retrieved via getValues- Returns:
This instance.
-
getValue
@Nullable() String getValue(@NonNull() String name)
Retrieves the value associated with the given name.
- Parameters:
name
- the name of the property- Returns:
The value associated with the
name
ornull
ifname
does not exist.
-
getValues
@NonNull() Map<String, String> getValues()
Returns the embedded map.
- Returns:
The embedded
Map
.
-
-
-
-