T
- input-typepublic final class InputsWithDirectory<T extends InputFromManager> extends Object
All inputs must be contained in this directory or one of its sub-direcotries.
Constructor and Description |
---|
InputsWithDirectory(List<T> inputs)
Creates without any parent directory.
|
InputsWithDirectory(List<T> inputs,
Optional<Path> directory) |
Modifier and Type | Method and Description |
---|---|
Optional<Path> |
directory()
The directory associated with the inputs.
|
boolean |
equals(Object o) |
Collection<NamedFile> |
findAllNonInputFiles()
Find all files in the input directory are not used as inputs.
|
int |
hashCode() |
List<T> |
inputs()
The inputs.
|
boolean |
isEmpty()
Whether no inputs exist.
|
Iterator<T> |
iterator()
Returns an iterator over the elements in this list in proper sequence.
|
ListIterator<T> |
listIterator()
Returns a list iterator over the elements in this list (in proper sequence).
|
<S extends InputFromManager,E extends Exception> |
map(CheckedFunction<T,S,E> mapFunction,
Class<? extends E> throwableClass)
Creates a new
InputsWithDirectory which is the result of mapping the existing inputs. |
<S extends InputFromManager> |
map(java.util.function.Function<T,S> mapFunction)
Creates a new
InputsWithDirectory which is the result of mapping the existing inputs. |
String |
toString() |
<S extends InputFromManager> |
withInputs(List<S> inputsToAssign)
Changes the inputs, but preserves the directory.
|
public InputsWithDirectory(List<T> inputs)
inputs
- the inputs.public <S extends InputFromManager> InputsWithDirectory<S> map(java.util.function.Function<T,S> mapFunction)
InputsWithDirectory
which is the result of mapping the existing inputs.
This is an immutable operation.
S
- the type of inputs that are mapped to.mapFunction
- the function that transforms and existing input into a new input.public <S extends InputFromManager,E extends Exception> InputsWithDirectory<S> map(CheckedFunction<T,S,E> mapFunction, Class<? extends E> throwableClass) throws E extends Exception
InputsWithDirectory
which is the result of mapping the existing inputs.
This is an immutable operation.
S
- the type of inputs that are mapped to.E
- an exception that may be thrown by mapFunction
.mapFunction
- the function that transforms and existing input into a new input.throwableClass
- class type of exception that may be thrown by mapFunction
.E
- if thrown by mapFunction
.E extends Exception
public <S extends InputFromManager> InputsWithDirectory<S> withInputs(List<S> inputsToAssign)
This is an immutable operation.
S
- type of inputs to assigninputsToAssign
- inputs to assigninputsToAssign
, but an unchanged
directory.public Collection<NamedFile> findAllNonInputFiles() throws OperationFailedException
OperationFailedException
- if directory isn't definedpublic boolean isEmpty()
public Iterator<T> iterator()
public ListIterator<T> listIterator()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.