|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtend.backend.functions.DuplicateAwareNamedFunctionCollection
public final class DuplicateAwareNamedFunctionCollection
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 | |
---|---|
DuplicateAwareNamedFunctionCollection()
|
Method Summary | |
---|---|
boolean |
contains(NamedFunction f)
checks if this collection already contains a function with identical signature. |
java.util.Collection<NamedFunction> |
getFunctions()
|
static boolean |
haveSameSignature(NamedFunction f1,
NamedFunction f2)
helper operation to compare two functions. |
NamedFunction |
register(NamedFunction f)
registers a function and returns the old function of the same signature if one was replaced, and null otherwise |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DuplicateAwareNamedFunctionCollection()
Method Detail |
---|
public NamedFunction register(NamedFunction f)
public boolean contains(NamedFunction f)
public java.util.Collection<NamedFunction> getFunctions()
public static boolean haveSameSignature(NamedFunction f1, NamedFunction f2)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |