Skip to content

Commit

Permalink
Add shortcut methods to MarkerSet
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Oct 10, 2022
1 parent 49b51f4 commit 58d8edf
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/java/de/bluecolored/bluemap/api/markers/MarkerSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,33 @@ public Map<String, Marker> getMarkers() {
return markers;
}

/**
* Convenience method to add a {@link Marker} to this {@link MarkerSet}.<br>
* Shortcut for: <code>getMarkers().get(String)</code>
* @see Map#get(Object)
*/
public Marker get(String key) {
return getMarkers().get(key);
}

/**
* Convenience method to add a {@link Marker} to this {@link MarkerSet}.<br>
* Shortcut for: <code>getMarkers().put(String,Marker)</code>
* @see Map#put(Object, Object)
*/
public Marker put(String key, Marker marker) {
return getMarkers().put(key, marker);
}

/**
* Convenience method to remove a {@link Marker} from this {@link MarkerSet}.<br>
* Shortcut for: <code>getMarkers().remove(String)</code>
* @see Map#remove(Object)
*/
public Marker remove(String key) {
return getMarkers().remove(key);
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down

0 comments on commit 58d8edf

Please sign in to comment.