mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final1.git
synced 2024-11-27 18:55:55 +00:00
Document unusual equals behaviour
This commit is contained in:
parent
ed615fcf6b
commit
e0034200fb
@ -149,7 +149,7 @@ public final class Switch extends Rail {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether two switches are equal, ignoring the current configuration.
|
||||
* Check whether two switches are equal, ignoring the current configuration and their identifiers.
|
||||
*
|
||||
* @return whether this switch is equal to the other
|
||||
*/
|
||||
|
@ -150,6 +150,11 @@ public final class Track extends Rail {
|
||||
return String.format("t %d %s -> %s %d", getIdentifier(), start, end, getLength());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether two tracks are equal, ignoring their identifiers.
|
||||
*
|
||||
* @return whether this track is equal to another
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && getClass().equals(obj.getClass())) {
|
||||
|
Loading…
Reference in New Issue
Block a user