Class Limit<T extends InputFromManager>
- Type Parameters:
T
- input-type.
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 -
Method Summary
Modifier and TypeMethodDescriptionint
protected InputsWithDirectory
<T> inputsFromDelegate
(InputsWithDirectory<T> fromDelegate, InputManagerParameters parameters) Calculates the inputs to return given the inputs from the delegate.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
-
Constructor Details
-
Limit
public Limit()
-
-
Method Details
-
inputsFromDelegate
protected InputsWithDirectory<T> inputsFromDelegate(InputsWithDirectory<T> fromDelegate, InputManagerParameters parameters) throws InputReadFailedException Description copied from class:InputManagerUnary
Calculates the inputs to return given the inputs from the delegate.- Specified by:
inputsFromDelegate
in classInputManagerUnary<T extends InputFromManager>
- Parameters:
fromDelegate
- the inputs from the delegate.parameters
- parameters for determining inputs.- Returns:
- inputs to return after any further processing.
- Throws:
InputReadFailedException
- if inputs cannot be successfully read from the file-system.
-
getMaxNumberItems
public int getMaxNumberItems() -
setMaxNumberItems
public void setMaxNumberItems(int maxNumberItems)
-