public static class BookmarkList.Bookmark extends Object implements Comparable<BookmarkList.Bookmark>
Modifier and Type | Field and Description |
---|---|
private Bounds |
area |
private String |
name |
Constructor and Description |
---|
Bookmark()
Constructs a new empty
Bookmark . |
Bookmark(Bounds area)
Constructs a new unamed
Bookmark for the given area. |
Bookmark(Collection<String> list)
Constructs a new
Bookmark with the given contents. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BookmarkList.Bookmark b) |
boolean |
equals(Object obj) |
Bounds |
getArea()
Returns the bookmark area
|
String |
getName()
Returns the bookmark name
|
int |
hashCode() |
void |
setArea(Bounds area)
Sets the bookmark area
|
void |
setName(String name)
Sets the bookmark name
|
String |
toString() |
public Bookmark(Collection<String> list)
Bookmark
with the given contents.list
- Bookmark contents as a list of 5 elements.
First item is the name, then come bounds arguments (minlat, minlon, maxlat, maxlon)NumberFormatException
- if the bounds arguments are not numbersIllegalArgumentException
- if list contain less than 5 elementspublic Bookmark()
Bookmark
.public int compareTo(BookmarkList.Bookmark b)
compareTo
in interface Comparable<BookmarkList.Bookmark>
public void setName(String name)
name
- The bookmark name