public final class Metadata extends Object implements Serializable
Creating a GPX object with one track-segment and 3 track-points:
final Metadata gpx = Metadata.builder()
.author("Franz Wilhelmstötter")
.addLink(Link.of("http://jenetics.io"))
.build();
Modifier and Type | Class and Description |
---|---|
static class |
Metadata.Builder
Builder class for creating immutable
Metadata objects. |
Modifier and Type | Method and Description |
---|---|
static Metadata.Builder |
builder()
Return a new
Metadata builder. |
boolean |
equals(Object obj) |
Optional<Person> |
getAuthor()
Return the person or organization who created the GPX file.
|
Optional<Bounds> |
getBounds()
Return the minimum and maximum coordinates which describe the extent of
the coordinates in the file.
|
Optional<Copyright> |
getCopyright()
Return the copyright and license information governing use of the file.
|
Optional<String> |
getDescription()
Return a description of the contents of the GPX file.
|
Optional<String> |
getKeywords()
Return the keywords associated with the file.
|
List<Link> |
getLinks()
Return the URLs associated with the location described in the file.
|
Optional<String> |
getName()
Return the name of the GPX file.
|
Optional<ZonedDateTime> |
getTime()
Return the creation date of the file.
|
int |
hashCode() |
boolean |
isEmpty()
Return
true if all metadata properties are null or empty. |
boolean |
nonEmpty()
Return
true if not all metadata properties are null or empty. |
static Metadata |
of(String name,
String description,
Person author,
Copyright copyright,
List<Link> links,
ZonedDateTime time,
String keywords,
Bounds bounds)
Create a new
Metadata object with the given parameters. |
Metadata.Builder |
toBuilder()
Convert the immutable metadata object into a mutable
builder initialized with the current metadata values.
|
public Optional<String> getName()
public Optional<String> getDescription()
public Optional<Person> getAuthor()
public Optional<Copyright> getCopyright()
public List<Link> getLinks()
public Optional<ZonedDateTime> getTime()
public Optional<String> getKeywords()
public Optional<Bounds> getBounds()
public Metadata.Builder toBuilder()
this
metadatapublic boolean isEmpty()
true
if all metadata properties are null
or empty.true
if all metadata properties are null
or emptypublic boolean nonEmpty()
true
if not all metadata properties are null
or empty.true
if not all metadata properties are null
or emptypublic static Metadata.Builder builder()
Metadata
builder.Metadata
builderpublic static Metadata of(String name, String description, Person author, Copyright copyright, List<Link> links, ZonedDateTime time, String keywords, Bounds bounds)
Metadata
object with the given parameters.name
- the name of the GPX filedescription
- a description of the contents of the GPX fileauthor
- the person or organization who created the GPX filecopyright
- copyright and license information governing use of the
filelinks
- URLs associated with the location described in the filetime
- the creation date of the filekeywords
- keywords associated with the file. Search engines or
databases can use this information to classify the data.bounds
- minimum and maximum coordinates which describe the extent
of the coordinates in the fileMetadata
object with the given parametersNullPointerException
- if the given links
sequence is
null
© 2016-2017 Franz Wilhelmstötter (2017-02-22 21:53)