Class UsageInfo

  • All Implemented Interfaces:

    
    public class UsageInfo
    
                        

    This class embeds name/value pair properties in a HashMap and is part of a UsageRecord.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      UsageInfo(Map<String, String> infoValues) Constructs an instance with a HashMap.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UsageInfo

        UsageInfo(Map<String, String> infoValues)
        Constructs an instance with a HashMap.
        Parameters:
        infoValues - a non-null HashMap
    • 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 the HashMap
        value - a non-null/empty value associated with name
      • 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 - the HashMap previously retrieved via getValues
      • getValue

        @Nullable() String getValue(@NonNull() String name)

        Retrieves the value associated with the given name.

        Parameters:
        name - the name of the property
      • getValues

        @NonNull() Map<String, String> getValues()

        Returns the embedded map.