Package org.opentcs.data.model
Class Location.Link
java.lang.Object
org.opentcs.data.model.Location.Link
- All Implemented Interfaces:
Serializable
- Enclosing class:
Location
A link connecting a point and a location, expressing that the location is
reachable from the point.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLink(TCSResourceReference<Location> location, TCSResourceReference<Point> point) Creates a new Link. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to another one.Returns the operations allowed at this link.Returns a reference to the location end of this link.getPoint()Returns a reference to the point end of this link.booleanhasAllowedOperation(String operation) Checks if a vehicle is allowed to execute a given operation at this link.inthashCode()Returns a hash code for this link.withAllowedOperations(Set<String> allowedOperations) Creates a copy of this object, with the given allowed operations.
-
Constructor Details
-
Link
Creates a new Link.- Parameters:
location- A reference to the location end of this link.point- A reference to the point end of this link.
-
-
Method Details
-
getLocation
Returns a reference to the location end of this link.- Returns:
- A reference to the location end of this link.
-
getPoint
Returns a reference to the point end of this link.- Returns:
- A reference to the point end of this link.
-
getAllowedOperations
Returns the operations allowed at this link.- Returns:
- The operations allowed at this link.
-
hasAllowedOperation
Checks if a vehicle is allowed to execute a given operation at this link.- Parameters:
operation- The operation to be checked.- Returns:
trueif, and only if, vehicles are allowed to execute the given operation at his link.
-
withAllowedOperations
Creates a copy of this object, with the given allowed operations.- Parameters:
allowedOperations- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
equals
Checks if this object is equal to another one. TwoLinks are equal if they both reference the same location and point ends. -
hashCode
public int hashCode()Returns a hash code for this link. The hash code of aLocation.Linkis computed as the exclusive OR (XOR) of the hash codes of the associated location and point references.
-