Class ShuffleIfRequested<T extends InputFromManager>

Object
AnchorBean<InputManager<T>>
InputManager<T>
InputManagerUnary<T>
ShuffleIfRequested<T>
Type Parameters:
T - input-object type

public class ShuffleIfRequested<T extends InputFromManager> extends InputManagerUnary<T>
Like Shuffle if requested in the InputContextParameters otherwise makes no change to the inputs.

If a shuffle is requested, the inputs may be sorted alphabetically (depending on sortIfNotRequested.

The operations are coupled, as sorting makes no sense when shuffling is occurring, but is often desirable otherwise.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected InputsWithDirectory<T>
    inputsFromDelegate(InputsWithDirectory<T> fromDelegate, InputManagerParameters parameters)
     
    boolean
    When true, the inputs are sorted alphabetically, if a shuffle is not requested.
    void
    setSortIfNotRequested(boolean sortIfNotRequested)
    When true, the inputs are sorted alphabetically, if a shuffle is not requested.

    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

    • ShuffleIfRequested

      public ShuffleIfRequested()
  • 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
    • isSortIfNotRequested

      public boolean isSortIfNotRequested()
      When true, the inputs are sorted alphabetically, if a shuffle is not requested.
    • setSortIfNotRequested

      public void setSortIfNotRequested(boolean sortIfNotRequested)
      When true, the inputs are sorted alphabetically, if a shuffle is not requested.