Archived Website:
This website is a static snapshot for archival purposes only.
It is no longer maintained or updated.
operators
Class OperatorWeightComparator
java.lang.Object
|
+--operators.OperatorWeightComparator
- public class OperatorWeightComparator
- extends java.lang.Object
- implements java.util.Comparator
Dieser Comparator ordnet Operatoren nach ihren Gewichten. Wenn zwei
verglichene Operatoren Objekte der gleichen Klasse sind, dann sind
sie gleich.
- Version:
- 1.0
- Author:
- Nils Malzahn
- See Also:
Operator
|
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Gleich sind zwei Operatoren jedoch nur, wenn ihre Klassen
gleich sind. |
boolean |
equals(java.lang.Object obj)
|
| Methods inherited from class java.lang.Object |
,
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
OperatorWeightComparator
public OperatorWeightComparator()
equals
public boolean equals(java.lang.Object obj)
- Specified by:
- equals in interface java.util.Comparator
- Parameters:
obj - the reference object with which to compare.- Returns:
true only if the specified object is also
a comparator and it imposes the same ordering as this
comparator.- Overrides:
- equals in class java.lang.Object
- Since:
- Version 1.0
- See Also:
Object.equals(java.lang.Object),
Object.hashCode()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Gleich sind zwei Operatoren jedoch nur, wenn ihre Klassen
gleich sind. Sonst entscheidet das Gewicht nach der Ordnung.
- Specified by:
- compare in interface java.util.Comparator
- Returns:
- a negative integer, zero, or a positive integer as the
first argument is less than, equal to, or greater than the
second.
- Throws:
- java.lang.ClassCastException - if the arguments' types prevent them from
being compared by this Comparator.