Class QuantityTypeArithmeticGroupFunction.DimensionalGroupFunction

    • Field Detail

      • dimension

        protected final Class<? extends javax.measure.Quantity<?>> dimension
    • Constructor Detail

      • DimensionalGroupFunction

        public DimensionalGroupFunction​(Class<? extends javax.measure.Quantity<?>> dimension)
    • Method Detail

      • getStateAs

        public <T extends State> @Nullable T getStateAs​(@Nullable Set<Item> items,
                                                        Class<T> stateClass)
        Description copied from interface: GroupFunction
        Calculates the group state and returns it as a state of the requested type.
        Specified by:
        getStateAs in interface GroupFunction
        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

        public State[] getParameters()
        Description copied from interface: GroupFunction
        Returns the parameters of the function as an array.
        Specified by:
        getParameters in interface GroupFunction
        Returns:
        the parameters of this function
      • isSameDimension

        protected boolean isSameDimension​(@Nullable Item item)