Class DimensionSet


  • public class DimensionSet
    extends java.lang.Object
    A combination of dimension values.
    • Constructor Summary

      Constructors 
      Constructor Description
      DimensionSet()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DimensionSet add​(DimensionSet other)
      Add a dimension set with current dimension set and return a new dimension set from combining the two dimension sets.
      void addDimension​(java.lang.String dimension, java.lang.String value)
      Add another dimension entry to this DimensionSet.
      java.util.Set<java.lang.String> getDimensionKeys()  
      java.lang.String getDimensionValue​(java.lang.String key)  
      static DimensionSet of​(java.lang.String d1, java.lang.String v1)
      Return a dimension set that contains a single pair of key-value.
      static DimensionSet of​(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2)
      Return a dimension set that contains two entries.
      static DimensionSet of​(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3)
      Return a dimension set that contains three entries.
      static DimensionSet of​(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4)
      Return a dimension set that contains four entries.
      static DimensionSet of​(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4, java.lang.String d5, java.lang.String v5)
      Return a dimension set that contains five entries.
      • Methods inherited from class java.lang.Object

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

      • DimensionSet

        public DimensionSet()
    • Method Detail

      • of

        public static DimensionSet of​(java.lang.String d1,
                                      java.lang.String v1,
                                      java.lang.String d2,
                                      java.lang.String v2,
                                      java.lang.String d3,
                                      java.lang.String v3)
                               throws InvalidDimensionException,
                                      DimensionSetExceededException
        Return a dimension set that contains three entries.
        Parameters:
        d1 - Name of the first dimension
        v1 - Value of the first dimension
        d2 - Name of the second dimension
        v2 - Value of the second dimension
        d3 - Name of the third dimension
        v3 - Value of the third dimension
        Returns:
        a DimensionSet from the parameters
        Throws:
        InvalidDimensionException - if the dimension name or value is invalid
        DimensionSetExceededException - if the number of dimensions exceeds the limit
      • of

        public static DimensionSet of​(java.lang.String d1,
                                      java.lang.String v1,
                                      java.lang.String d2,
                                      java.lang.String v2,
                                      java.lang.String d3,
                                      java.lang.String v3,
                                      java.lang.String d4,
                                      java.lang.String v4)
                               throws InvalidDimensionException,
                                      DimensionSetExceededException
        Return a dimension set that contains four entries.
        Parameters:
        d1 - Name of the first dimension
        v1 - Value of the first dimension
        d2 - Name of the second dimension
        v2 - Value of the second dimension
        d3 - Name of the third dimension
        v3 - Value of the third dimension
        d4 - Name of the fourth dimension
        v4 - Value of the fourth dimension
        Returns:
        a DimensionSet from the parameters
        Throws:
        InvalidDimensionException - if the dimension name or value is invalid
        DimensionSetExceededException - if the number of dimensions exceeds the limit
      • of

        public static DimensionSet of​(java.lang.String d1,
                                      java.lang.String v1,
                                      java.lang.String d2,
                                      java.lang.String v2,
                                      java.lang.String d3,
                                      java.lang.String v3,
                                      java.lang.String d4,
                                      java.lang.String v4,
                                      java.lang.String d5,
                                      java.lang.String v5)
                               throws InvalidDimensionException,
                                      DimensionSetExceededException
        Return a dimension set that contains five entries.
        Parameters:
        d1 - Name of the first dimension
        v1 - Value of the first dimension
        d2 - Name of the second dimension
        v2 - Value of the second dimension
        d3 - Name of the third dimension
        v3 - Value of the third dimension
        d4 - Name of the fourth dimension
        v4 - Value of the fourth dimension
        d5 - Name of the fifth dimension
        v5 - Value of the fifth dimension
        Returns:
        a DimensionSet from the parameters
        Throws:
        InvalidDimensionException - if the dimension name or value is invalid
        DimensionSetExceededException - if the number of dimensions exceeds the limit
      • add

        public DimensionSet add​(DimensionSet other)
                         throws DimensionSetExceededException
        Add a dimension set with current dimension set and return a new dimension set from combining the two dimension sets.
        Parameters:
        other - Other dimension sets to merge with current
        Returns:
        a new DimensionSet from combining the current DimensionSet with other
        Throws:
        DimensionSetExceededException - if the number of dimensions exceeds the limit
      • getDimensionKeys

        public java.util.Set<java.lang.String> getDimensionKeys()
        Returns:
        all the dimension names in the dimension set.
      • getDimensionValue

        public java.lang.String getDimensionValue​(java.lang.String key)
        Parameters:
        key - the name of the dimension
        Returns:
        the dimension value associated with a dimension key.