Class Restriction

java.lang.Object
org.eclipse.mosaic.lib.database.road.Restriction

public class Restriction extends Object
This represents a turn restriction. And can either say that one cannot turn from getSource() to {link #getTarget} through getVia() or that one can only turn/go from getSource() to {link #getTarget} through getVia().
  • Constructor Details

    • Restriction

      public Restriction(@Nonnull String id, @Nonnull Restriction.Type type, @Nonnull Way source, @Nonnull Node via, @Nonnull Way target)
      Creates a new Restriction object.
      Parameters:
      id - Unique identifier of the restriction.
      type - The type of the restriction.
      source - Start point the restriction.
      target - Target of the restriction.
      via - Restriction over the node.
  • Method Details

    • getId

      @Nonnull public String getId()
    • getType

      @Nonnull public Restriction.Type getType()
    • getSource

      @Nonnull public Way getSource()
    • getTarget

      @Nonnull public Way getTarget()
    • getVia

      @Nonnull public Node getVia()
    • applyRestriction

      public void applyRestriction()
      This tries to apply this Restriction on the affected Connections.