Class IndexedResult

java.lang.Object
org.moeaframework.analysis.series.IndexedResult

public class IndexedResult extends Object
References a ResultEntry stored in a series, in particular providing access to the index along with methods to iterate through the series.
  • Constructor Details

    • IndexedResult

      public IndexedResult(ResultSeries series, int index, ResultEntry entry)
      Constructs a new indexed result.
      Parameters:
      series - the series containing this result
      index - the index of this result in the series
      entry - the underlying result
  • Method Details

    • getSeries

      public ResultSeries getSeries()
      Returns the series containing this result.
      Returns:
      the series containing this result
    • getIndex

      public int getIndex()
      Returns the index of this result in the series.
      Returns:
      the index of this result
    • getEntry

      public ResultEntry getEntry()
      Returns the underlying result entry.
      Returns:
      the result entry
    • getPopulation

      public Population getPopulation()
      Returns the population contained in this result. This is shorthand for calling getEntry().
      Returns:
      the population
    • getProperties

      public TypedProperties getProperties()
      Returns the properties contained in this result. This is shorthand for calling getEntry().
      Returns:
      the properties
    • hasNext

      public boolean hasNext()
      Returns true if there exists a result following this entry in the series such that calling next() would succeed.
      Returns:
      true if there exists a result following this entry in the series; false otherwise
    • next

      public IndexedResult next()
      Returns the result immediately following this entry in the series.
      Returns:
      the next result
      Throws:
      NoSuchElementException - if at the end of the series
    • hasPrevious

      public boolean hasPrevious()
      Returns true if there exists a result before this entry in the series such that calling previous() would succeed.
      Returns:
      true if there exists a result before this entry in the series; false otherwise
    • previous

      public IndexedResult previous()
      Returns the result immediately before this entry in the series.
      Returns:
      the previous result
      Throws:
      NoSuchElementException - if at the start of the series