Class LevelResultCollection
Object
LevelResultCollection
- All Implemented Interfaces:
Iterable<LevelResult>
A collection of
LevelResult
objects that can be iterated over and searched.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(LevelResult arg0) Adds aLevelResult
to the collection.findClosestResult
(Point3i point) Finds theLevelResult
closest to a given point.iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LevelResultCollection
public LevelResultCollection()
-
-
Method Details
-
add
Adds aLevelResult
to the collection.- Parameters:
arg0
- theLevelResult
to add- Returns:
- true if the collection changed as a result of the call
-
findClosestResult
Finds theLevelResult
closest to a given point.- Parameters:
point
- thePoint3i
to find the closest result to- Returns:
- the
LevelResult
closest to the given point, or null if the collection is empty
-
iterator
- Specified by:
iterator
in interfaceIterable<LevelResult>
-