Class ResultsVectorList

Object
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 Details

    • ResultsVectorList

      public ResultsVectorList(ResultsVector results)
      Creates with the list containing a single item.
      Parameters:
      results - the single item for the list.
    • ResultsVectorList

      public ResultsVectorList()
  • Method Details

    • add

      public void add(ResultsVector results)
      Add a ResultsVector to the list in the final position.
      Parameters:
      results - the results to add.
    • size

      public int size()
      The number of ResultsVectors in the list.
      Returns:
      the total number.
    • get

      public ResultsVector get(int index)
      Gets a ResultsVector at a particular position i nthe list.
      Parameters:
      index - the position (zero-indexed).
      Returns:
      the vector at the position.
    • iterator

      public Iterator<ResultsVector> iterator()
      Specified by:
      iterator in interface Iterable<ResultsVector>
    • stream

      public Stream<ResultsVector> stream()
      A stream of ResultsVectors.
      Returns:
      the stream.
    • isEmpty

      public boolean isEmpty()
      Returns true if the list contains no elements.
      Returns:
      true if the list contains no elements