Class ShuffleIfRequested<T extends org.anchoranalysis.io.input.InputFromManager>

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.input.bean.InputManager<T>>
org.anchoranalysis.io.input.bean.InputManager<T>
org.anchoranalysis.io.input.bean.InputManagerUnary<T>
org.anchoranalysis.plugin.io.bean.input.ShuffleIfRequested<T>
Type Parameters:
T - input-object type

public class ShuffleIfRequested<T extends org.anchoranalysis.io.input.InputFromManager>
extends org.anchoranalysis.io.input.bean.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
    ShuffleIfRequested()  
  • Method Summary

    Modifier and Type Method Description
    protected org.anchoranalysis.io.input.InputsWithDirectory<T> inputsFromDelegate​(org.anchoranalysis.io.input.InputsWithDirectory<T> fromDelegate, org.anchoranalysis.io.input.bean.InputManagerParameters parameters)  
    boolean isSortIfNotRequested()
    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

  • Method Details

    • inputsFromDelegate

      protected org.anchoranalysis.io.input.InputsWithDirectory<T> inputsFromDelegate​(org.anchoranalysis.io.input.InputsWithDirectory<T> fromDelegate, org.anchoranalysis.io.input.bean.InputManagerParameters parameters) throws org.anchoranalysis.io.input.InputReadFailedException
      Specified by:
      inputsFromDelegate in class org.anchoranalysis.io.input.bean.InputManagerUnary<T extends org.anchoranalysis.io.input.InputFromManager>
      Throws:
      org.anchoranalysis.io.input.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.