Class Location.Link

java.lang.Object
org.opentcs.data.model.Location.Link
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Location

public static class Location.Link
extends java.lang.Object
implements java.io.Serializable
A link connecting a point and a location, expressing that the location is reachable from the point.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Link​(TCSResourceReference<Location> location, TCSResourceReference<Point> point)
    Creates a new Link.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)
    Checks if this object is equal to another one.
    java.util.Set<java.lang.String> getAllowedOperations()
    Returns the operations allowed at this link.
    TCSResourceReference<Location> getLocation()
    Returns a reference to the location end of this link.
    TCSResourceReference<Point> getPoint()
    Returns a reference to the point end of this link.
    boolean hasAllowedOperation​(java.lang.String operation)
    Checks if a vehicle is allowed to execute a given operation at this link.
    int hashCode()
    Returns a hash code for this link.
    Location.Link withAllowedOperations​(java.util.Set<java.lang.String> allowedOperations)
    Creates a copy of this object, with the given allowed operations.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getLocation

      public TCSResourceReference<Location> getLocation()
      Returns a reference to the location end of this link.
      Returns:
      A reference to the location end of this link.
    • getPoint

      public TCSResourceReference<Point> getPoint()
      Returns a reference to the point end of this link.
      Returns:
      A reference to the point end of this link.
    • getAllowedOperations

      public java.util.Set<java.lang.String> getAllowedOperations()
      Returns the operations allowed at this link.
      Returns:
      The operations allowed at this link.
    • hasAllowedOperation

      public boolean hasAllowedOperation​(java.lang.String operation)
      Checks if a vehicle is allowed to execute a given operation at this link.
      Parameters:
      operation - The operation to be checked.
      Returns:
      true if, and only if, vehicles are allowed to execute the given operation at his link.
    • withAllowedOperations

      public Location.Link withAllowedOperations​(java.util.Set<java.lang.String> allowedOperations)
      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

      public boolean equals​(java.lang.Object obj)
      Checks if this object is equal to another one. Two Links are equal if they both reference the same location and point ends.
      Overrides:
      equals in class java.lang.Object
      Parameters:
      obj - The object to compare this one to.
      Returns:
      true if, and only if, obj is also a Link and reference the same location and point ends as this one.
    • hashCode

      public int hashCode()
      Returns a hash code for this link. The hash code of a Location.Link is computed as the exclusive OR (XOR) of the hash codes of the associated location and point references.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      A hash code for this link.