public class SolutionGroup<T> extends Object
| Constructor and Description |
|---|
SolutionGroup(Bindings<T> bindings)
Creates a new solution group for a set of bindings
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Solution<T> sol,
long now)
Adds a solution, logically, to this group.
|
boolean |
equals(Object other) |
Bindings<T> |
getBindings()
Gets the bindings of this solution group
|
LList<SolutionPattern> |
getSolutions()
Gets the solutions contained in this group
|
int |
hashCode() |
int |
removeExpired(long now)
Removes all expired solutions from this group.
|
public Bindings<T> getBindings()
public LList<SolutionPattern> getSolutions()
getBindings().public boolean add(Solution<T> sol, long now)
sol - a new solution for potential addition to this group.
The bindings of the added solution must be identical to those of this group.now - the current time in milliseconds since the Unix epoch.
The solution group is updated with respect to this time stamp in that an expired solution will
be rejected and expired solutions still present in the group and encountered in the process of
insertion will be removed.public int removeExpired(long now)
now - the current time, in milliseconds since the Unix epochCopyright © 2016. All Rights Reserved.