Class UsageInfo
-
- All Implemented Interfaces:
public class UsageInfoThis class embeds name/value pair properties in a
HashMapand 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 UsageInfosetValue(@NonNull() String name, @NonNull() String value)Stores a name value pair. UsageInfosetValues(@NonNull() Map<String, String> infoValues)Sets values by passing in the embedded HashMapobtained via getValues that has contents filled or changed outside and prior to this method call.StringgetValue(@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/emptystring used as the key for theHashMapvalue- a non-null/emptyvalue associated withname- Returns:
This instance.
-
setValues
@NonNull() UsageInfo setValues(@NonNull() Map<String, String> infoValues)
Sets values by passing in the embedded
HashMapobtained via getValues that has contents filled or changed outside and prior to this method call.- Parameters:
infoValues- theHashMappreviously 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
nameornullifnamedoes not exist.
-
getValues
@NonNull() Map<String, String> getValues()
Returns the embedded map.
- Returns:
The embedded
Map.
-
-
-
-