Class ResultHolder<T>

    • Constructor Detail

      • ResultHolder

        public ResultHolder​(Class<T> requiredClass)
    • Method Detail

      • getRequiredClass

        public Class<T> getRequiredClass()
        Returns:
        the class of values, which acceptable by this result holder
      • isMultiple

        public abstract boolean isMultiple()
        Returns:
        true if it accepts 0, 1 or more values. false if it accepts exactly one value. If none, then value is null
      • addResult

        public abstract void addResult​(T value)
        adds a result into this result holder
        Parameters:
        value - a new value of result holder
      • mapEachResult

        public abstract void mapEachResult​(Function<T,​T> consumer)
        calls consumer.accept(value) once for each contained value
        Parameters:
        consumer -
      • getResults

        public abstract List<T> getResults()
        Returns:
        List of actually stored results