Class LevelResultCollection

Object
LevelResultCollection
All Implemented Interfaces:
Iterable<LevelResult>

public class LevelResultCollection extends Object implements Iterable<LevelResult>
A collection of LevelResult objects that can be iterated over and searched.
  • Constructor Details

    • LevelResultCollection

      public LevelResultCollection()
  • Method Details

    • add

      public boolean add(LevelResult arg0)
      Adds a LevelResult to the collection.
      Parameters:
      arg0 - the LevelResult to add
      Returns:
      true if the collection changed as a result of the call
    • findClosestResult

      public LevelResult findClosestResult(Point3i point)
      Finds the LevelResult closest to a given point.
      Parameters:
      point - the Point3i to find the closest result to
      Returns:
      the LevelResult closest to the given point, or null if the collection is empty
    • iterator

      public Iterator<LevelResult> iterator()
      Specified by:
      iterator in interface Iterable<LevelResult>