Interface GroupFunction

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  GroupFunction.Equality
      This is the default group function that does nothing else than to check if all member items have the same state.
    • Method Detail

      • calculate

        State calculate​(Set<Item> items)
        Determines the current state of a group based on a list of items
        Parameters:
        items - the items to calculate a group state for
        Returns:
        the calculated group state
      • getStateAs

        <T extends State> T getStateAs​(Set<Item> items,
                                       Class<T> stateClass)
        Calculates the group state and returns it as a state of the requested type.
        Parameters:
        items - the items to calculate a group state for
        stateClass - the type in which the state should be returned
        Returns:
        the calculated group state of the requested type or null, if type is not supported
      • getParameters

        State[] getParameters()
        Returns the parameters of the function as an array.
        Returns:
        the parameters of this function