refactor inheritance graphs slightly

This commit is contained in:
Luck committed 2018-04-20 14:00:50 +01:00
1 parent f8d34d7f46
commit 957365ab91
4 files changed
+13 -29

No files matched your search

@@ -26,8 +26,6 @@
package me.lucko.luckperms.sponge.service.inheritance;
import me.lucko.luckperms.common.graph.Graph;
import me.lucko.luckperms.common.graph.GraphTraversers;
import me.lucko.luckperms.common.graph.TraversalAlgorithm;
import me.lucko.luckperms.sponge.service.calculated.CalculatedSubject;
/**
@@ -35,16 +33,4 @@ import me.lucko.luckperms.sponge.service.calculated.CalculatedSubject;
*/
public interface SubjectInheritanceGraph extends Graph<CalculatedSubject> {
/**
* Returns an iterable which will traverse this inheritance graph using the
* specified algorithm starting at the given node.
*
* @param algorithm the algorithm to use when traversing
* @param startNode the start node in the inheritance graph
* @return an iterable
*/
default Iterable<CalculatedSubject> traverse(TraversalAlgorithm algorithm, CalculatedSubject startNode) {
return GraphTraversers.traverseUsing(algorithm, this, startNode);
}
}