Class SourceBounds

java.lang.Object
org.openstreetmap.josm.data.Bounds
org.openstreetmap.josm.data.sources.SourceBounds
All Implemented Interfaces:
IBounds
Direct Known Subclasses:
ImageryInfo.ImageryBounds

public class SourceBounds extends Bounds
Multi-polygon bounds for source backgrounds. Used to display source coverage in preferences and to determine relevant source entries based on edit location.
Since:
16545 (extracted from ImageryInfo.ImageryBounds)
  • Field Details

  • Constructor Details

    • SourceBounds

      public SourceBounds(String asString, String separator)
      Constructs a new SourceBounds from string.
      Parameters:
      asString - The string containing the list of shapes defining this bounds
      separator - The shape separator in the given string, usually a comma
  • Method Details

    • addShape

      public final void addShape(Shape shape)
      Adds a new shape to this bounds.
      Parameters:
      shape - The shape to add
    • setShapes

      public final void setShapes(List<Shape> shapes)
      Sets the list of shapes defining this bounds.
      Parameters:
      shapes - The list of shapes defining this bounds.
    • getShapes

      public final List<Shape> getShapes()
      Returns the list of shapes defining this bounds.
      Returns:
      The list of shapes defining this bounds
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Bounds
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Bounds