Class ResultsVectorList
Object
org.anchoranalysis.feature.results.ResultsVectorList
- All Implemented Interfaces:
Iterable<ResultsVector>
public class ResultsVectorList extends Object implements Iterable<ResultsVector>
A list of elements of type
ResultsVector.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ResultsVectorList()ResultsVectorList(ResultsVector results)Creates with the list containing a single item. -
Method Summary
Modifier and Type Method Description voidadd(ResultsVector results)Add aResultsVectorto the list in the final position.ResultsVectorget(int index)Gets aResultsVectorat a particular position i nthe list.booleanisEmpty()Returnstrueif the list contains no elements.Iterator<ResultsVector>iterator()intsize()The number ofResultsVectors in the list.Stream<ResultsVector>stream()A stream ofResultsVectors.
-
Constructor Details
-
ResultsVectorList
Creates with the list containing a single item.- Parameters:
results- the single item for the list.
-
ResultsVectorList
public ResultsVectorList()
-
-
Method Details
-
add
Add aResultsVectorto the list in the final position.- Parameters:
results- the results to add.
-
size
public int size()The number ofResultsVectors in the list.- Returns:
- the total number.
-
get
Gets aResultsVectorat a particular position i nthe list.- Parameters:
index- the position (zero-indexed).- Returns:
- the vector at the position.
-
iterator
- Specified by:
iteratorin interfaceIterable<ResultsVector>
-
stream
A stream ofResultsVectors.- Returns:
- the stream.
-
isEmpty
public boolean isEmpty()Returnstrueif the list contains no elements.- Returns:
trueif the list contains no elements
-