mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final1.git
synced 2024-11-24 01:15:05 +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
|
* @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());
|
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
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj != null && getClass().equals(obj.getClass())) {
|
if (obj != null && getClass().equals(obj.getClass())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user