Class Limit<T extends InputFromManager>

Object
AnchorBean<InputManager<T>>
InputManager<T>
InputManagerUnary<T>
Limit<T>
Type Parameters:
T - input-type.

public class Limit<T extends InputFromManager> extends InputManagerUnary<T>
Limits the number of input-objects to a certain hard-maximum

If there's more input-objects than the maximum, the first maxNumItems are chosen

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    protected InputsWithDirectory<T>
    inputsFromDelegate(InputsWithDirectory<T> fromDelegate, InputManagerParameters parameters)
     
    void
    setMaxNumberItems(int maxNumberItems)
     

    Methods inherited from class org.anchoranalysis.io.input.bean.InputManagerUnary

    getInput, inputs, setInput

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Limit

      public Limit()
  • Method Details

    • inputsFromDelegate

      protected InputsWithDirectory<T> inputsFromDelegate(InputsWithDirectory<T> fromDelegate, InputManagerParameters parameters) throws InputReadFailedException
      Specified by:
      inputsFromDelegate in class InputManagerUnary<T extends InputFromManager>
      Throws:
      InputReadFailedException
    • getMaxNumberItems

      public int getMaxNumberItems()
    • setMaxNumberItems

      public void setMaxNumberItems(int maxNumberItems)