Enum Aggregate.Group

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Aggregate.Group>
    Enclosing class:
    Aggregate

    public static enum Aggregate.Group
    extends java.lang.Enum<Aggregate.Group>
    What kind of roll-up is it?
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Group()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.Integer> getRollup​(java.util.List<ImmutableBitSet> groupSets)
      Returns the ordered list of bits in a rollup.
      static Aggregate.Group induce​(ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets)  
      static boolean isRollup​(ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets)
      Returns whether a list of sets is a rollup.
      static Aggregate.Group valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Aggregate.Group[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Group

        private Group()
    • Method Detail

      • values

        public static Aggregate.Group[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Aggregate.Group c : Aggregate.Group.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Aggregate.Group valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isRollup

        public static boolean isRollup​(ImmutableBitSet groupSet,
                                       java.util.List<ImmutableBitSet> groupSets)
        Returns whether a list of sets is a rollup.

        For example, if groupSet is {2, 4, 5}, then [{2, 4, 5], {2, 5}, {5}, {}] is a rollup. The first item is equal to groupSet, and each subsequent item is a subset with one fewer bit than the previous.

        See Also:
        getRollup(List)
      • getRollup

        public static java.util.List<java.lang.Integer> getRollup​(java.util.List<ImmutableBitSet> groupSets)
        Returns the ordered list of bits in a rollup.

        For example, given a groupSets value [{2, 4, 5], {2, 5}, {5}, {}], returns the list [5, 2, 4], which are the succession of bits added to each of the sets starting with the empty set.

        See Also:
        isRollup(ImmutableBitSet, List)