|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtend.backend.functions.DuplicateAwareFunctionCollection
public final class DuplicateAwareFunctionCollection
This class collects functions. It removes an old one if a new one with identical signature is added, allowing overwriting. The check for "identical signature" is performed only if both functions have no guard. Functions with guards are never treated as having the same signature because an equality check would then require comparison of guards, a tricky undertaking which is left for a future version.
Constructor Summary | |
---|---|
DuplicateAwareFunctionCollection()
|
Method Summary | |
---|---|
boolean |
contains(Function f)
checks if this collection already contains a function with identical signature. |
java.util.Collection<Function> |
getFunctions()
|
static boolean |
haveSameSignature(Function f1,
Function f2)
helper operation to compare two functions. |
Function |
register(Function f)
registers a function and returns the old function of the same signature if one was replaced, and null otherwise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuplicateAwareFunctionCollection()
Method Detail |
---|
public Function register(Function f)
public boolean contains(Function f)
public java.util.Collection<Function> getFunctions()
public static boolean haveSameSignature(Function f1, Function f2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |