Class InputData
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.aozan3.dataprocessor.InputData
-
public class InputData extends Object
This class define InputData for processors.- Since:
- 3.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(InputData collection)
Add all the content of an existing collection to the current collectionvoid
add(RunData runData)
Add a run data.void
add(Collection<RunData> collection)
Add a run data.void
clear()
Clear the collection.Set<RunData>
entries()
Get all the entries in the collectionInputData
filter(DataTypeFilter filter)
Filter the collection.RunData
get(DataType dataType)
Get the first RunData with a matching data type.RunData
get(DataType.Category category)
Get a RunData from its data type.RunData
getLastRunData()
RunData
getTheOnlyElement()
Get the only RunData element in the collectionboolean
isEmpty()
Test if the collection is empty.boolean
isOneElement()
Test if the size of the collection is 1.int
size()
Get the size of the collection.
-
-
-
Constructor Detail
-
InputData
public InputData()
This constructor create an empty InputData.
-
InputData
public InputData(RunData runData)
Create a new object with one element- Parameters:
runData
- element to add
-
InputData
public InputData(Collection<RunData> runData)
Create a new object with the content of a collection of RunData objects.- Parameters:
runData
- the element to add
-
-
Method Detail
-
add
public void add(RunData runData)
Add a run data.- Parameters:
runData
- run data to add
-
add
public void add(Collection<RunData> collection)
Add a run data.- Parameters:
collection
- run data to add
-
add
public void add(InputData collection)
Add all the content of an existing collection to the current collection- Parameters:
collection
- collection to add
-
entries
public Set<RunData> entries()
Get all the entries in the collection- Returns:
- a HashSet with a copy of all entries
-
filter
public InputData filter(DataTypeFilter filter)
Filter the collection.- Parameters:
filter
- the filter to use- Returns:
- a new collection
-
clear
public void clear()
Clear the collection.
-
size
public int size()
Get the size of the collection.- Returns:
- the size of the collection
-
isEmpty
public boolean isEmpty()
Test if the collection is empty.- Returns:
- true if the collection is empty
-
isOneElement
public boolean isOneElement()
Test if the size of the collection is 1.- Returns:
- true if there is only one element in the collection
-
getTheOnlyElement
public RunData getTheOnlyElement()
Get the only RunData element in the collection- Returns:
- the only RunData element in the collection
- Throws:
IllegalStateException
- if there is not one element in the collection
-
get
public RunData get(DataType dataType)
Get the first RunData with a matching data type.- Parameters:
dataType
- the data type of the run data- Returns:
- a RunData object
- Throws:
NoSuchElementException
- if the element does not exists
-
get
public RunData get(DataType.Category category)
Get a RunData from its data type.- Parameters:
category
- the data category of the run data- Returns:
- a RunData object
- Throws:
NoSuchElementException
- if the element does not exists
-
getLastRunData
public RunData getLastRunData()
-
-