|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.data.osm.history.History
public class History
Represents the history of an OSM primitive. The history consists of a list of object snapshots with a specific version.
Nested Class Summary | |
---|---|
private static interface |
History.FilterPredicate
|
Field Summary | |
---|---|
private long |
id
the object id |
private OsmPrimitiveType |
type
|
private java.util.ArrayList<HistoryOsmPrimitive> |
versions
the list of object snapshots |
Constructor Summary | |
---|---|
protected |
History(long id,
OsmPrimitiveType type,
java.util.List<HistoryOsmPrimitive> versions)
Creates a new history for an OSM primitive |
Method Summary | |
---|---|
History |
between(java.util.Date fromDate,
java.util.Date untilDate)
|
History |
between(long fromVersion,
long untilVersion)
|
boolean |
contains(long version)
|
private static History |
filter(History history,
History.FilterPredicate predicate)
|
History |
forUserId(long uid)
|
History |
from(java.util.Date fromDate)
|
History |
from(long fromVersion)
|
HistoryOsmPrimitive |
get(int idx)
|
HistoryOsmPrimitive |
getByDate(java.util.Date date)
|
HistoryOsmPrimitive |
getByVersion(long version)
Replies the history primitive with version version . |
HistoryOsmPrimitive |
getEarliest()
|
long |
getId()
|
HistoryOsmPrimitive |
getLatest()
|
int |
getNumVersions()
|
PrimitiveId |
getPrimitiveId()
Replies the primitive id for this history. |
OsmPrimitiveType |
getType()
|
boolean |
isEmpty()
|
History |
sortAscending()
|
History |
sortDescending()
|
java.lang.String |
toString()
|
History |
until(java.util.Date untilDate)
|
History |
until(long untilVersion)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<HistoryOsmPrimitive> versions
private final long id
private final OsmPrimitiveType type
Constructor Detail |
---|
protected History(long id, OsmPrimitiveType type, java.util.List<HistoryOsmPrimitive> versions)
id
- the id. >0 required.type
- the primitive type. Must not be null.versions
- a list of versions. Can be null.
java.lang.IllegalArgumentException
- thrown if id <= 0
java.lang.IllegalArgumentException
- if type is nullMethod Detail |
---|
private static History filter(History history, History.FilterPredicate predicate)
public History sortAscending()
public History sortDescending()
public History from(java.util.Date fromDate)
public History until(java.util.Date untilDate)
public History between(java.util.Date fromDate, java.util.Date untilDate)
public History from(long fromVersion)
public History until(long untilVersion)
public History between(long fromVersion, long untilVersion)
public History forUserId(long uid)
public long getId()
public PrimitiveId getPrimitiveId()
public boolean contains(long version)
public HistoryOsmPrimitive getByVersion(long version)
version
. null,
if no such primitive exists.
version
- the version
version
public HistoryOsmPrimitive getByDate(java.util.Date date)
public HistoryOsmPrimitive get(int idx)
public HistoryOsmPrimitive getEarliest()
public HistoryOsmPrimitive getLatest()
public int getNumVersions()
public boolean isEmpty()
public OsmPrimitiveType getType()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |