|
|||||||||
| Home >> All >> [ jtemporal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jtemporal
Class AbstractTemporalUnaryMap

java.lang.Objectjtemporal.AbstractTemporalUnaryMap
- All Implemented Interfaces:
- TemporalUnaryMap
- Direct Known Subclasses:
- TreeTemporalUnaryMap, TreeTemporalUnaryMap.SubMap
- public abstract class AbstractTemporalUnaryMap
- extends java.lang.Object
- implements TemporalUnaryMap
- extends java.lang.Object
Features common to the UnaryMaps.
- Version:
- $Id$
| Constructor Summary | |
AbstractTemporalUnaryMap()
|
|
| Method Summary | |
abstract void |
clear()
Removes all mappings from this map (optional operation). |
abstract boolean |
containsInstant(Instant instant)
Returns true if this map contains a mapping for the specified Instant. |
abstract boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more Periods to the specified value. |
boolean |
equalContent(java.lang.Object o)
Compares the specified object with this map for content equality. |
Period |
extent()
Returns a period enclosing firstInstant() and lastInstant() |
abstract Instant |
firstInstant()
Returns the first (lowest) instant currently in this temporal map. |
abstract Period |
firstPeriod()
Returns the first (lowest) period currently in this temporal map. |
abstract java.lang.Object |
get(Instant instant)
Returns the value to which this map maps the specified Instant. |
abstract Period |
getPeriod(Instant instant)
|
abstract boolean |
isEmpty()
Returns true if this map contains no Period-value mappings. |
abstract Instant |
lastInstant()
Returns the last (highest) instant currently in this temporal map. |
abstract Period |
lastPeriod()
Returns the last (highest) period currently in this temporal map. |
abstract java.util.Set |
periodSet()
Returns a set view of the periods contained in this map. |
abstract boolean |
put(Period p,
java.lang.Object value)
Associates the specified value with the specified Period in this map (optional operation). |
boolean |
putAll(TemporalUnaryMap tm)
Copies all of the mappings from the specified map to this map (optional operation). |
abstract boolean |
remove(Period p)
Removes the mapping(s) for this period from this map if present (optional operation). |
abstract int |
size()
Returns the number of Period-value mappings in this map. |
abstract TemporalUnaryMap |
subMap(Period p)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
AbstractTemporalUnaryMap
public AbstractTemporalUnaryMap()
| Method Detail |
clear
public abstract void clear()
- Description copied from interface:
TemporalUnaryMap - Removes all mappings from this map (optional operation).
- Specified by:
clearin interfaceTemporalUnaryMap
size
public abstract int size()
- Description copied from interface:
TemporalUnaryMap - Returns the number of Period-value mappings in this map. If the
map contains more than Integer.MAX_VALUE elements, returns
Integer.MAX_VALUE.
- Specified by:
sizein interfaceTemporalUnaryMap
isEmpty
public abstract boolean isEmpty()
- Description copied from interface:
TemporalUnaryMap - Returns true if this map contains no Period-value mappings.
- Specified by:
isEmptyin interfaceTemporalUnaryMap
get
public abstract java.lang.Object get(Instant instant)
- Description copied from interface:
TemporalUnaryMap - Returns the value to which this map maps the specified Instant. Returns null
if the map contains no mapping at this Instant.
It is not possible to map to a null Instant.
- Specified by:
getin interfaceTemporalUnaryMap
getPeriod
public abstract Period getPeriod(Instant instant)
- Specified by:
getPeriodin interfaceTemporalUnaryMap
containsInstant
public abstract boolean containsInstant(Instant instant)
- Description copied from interface:
TemporalUnaryMap - Returns true if this map contains a mapping for the specified
Instant.
- Specified by:
containsInstantin interfaceTemporalUnaryMap
containsValue
public abstract boolean containsValue(java.lang.Object value)
- Description copied from interface:
TemporalUnaryMap - Returns true if this map maps one or more Periods to the
specified value.
- Specified by:
containsValuein interfaceTemporalUnaryMap
put
public abstract boolean put(Period p, java.lang.Object value)
- Description copied from interface:
TemporalUnaryMap - Associates the specified value with the specified Period in this map
(optional operation).
If the map previously contained a mapping to a period overlapping
this period, the old value is replaced for the current period.
- Specified by:
putin interfaceTemporalUnaryMap
remove
public abstract boolean remove(Period p)
- Description copied from interface:
TemporalUnaryMap - Removes the mapping(s) for this period from this map if present (optional
operation).
- Specified by:
removein interfaceTemporalUnaryMap
periodSet
public abstract java.util.Set periodSet()
- Description copied from interface:
TemporalUnaryMap - Returns a set view of the periods contained in this map. The set is
backed by the map, so changes to the map are reflected in the set, and
vice-versa. If the map is modified while an iteration over the set is
in progress, the results of the iteration are undefined. The set
supports element removal, which removes the corresponding mapping from
the map, via the Iterator.remove, Set.remove,
removeAll retainAll, and clear operations.
It does not support the add or addAll operations.
- Specified by:
periodSetin interfaceTemporalUnaryMap
firstInstant
public abstract Instant firstInstant()
- Description copied from interface:
TemporalUnaryMap - Returns the first (lowest) instant currently in this temporal map.
- Specified by:
firstInstantin interfaceTemporalUnaryMap
lastInstant
public abstract Instant lastInstant()
- Description copied from interface:
TemporalUnaryMap - Returns the last (highest) instant currently in this temporal map.
- Specified by:
lastInstantin interfaceTemporalUnaryMap
firstPeriod
public abstract Period firstPeriod()
- Description copied from interface:
TemporalUnaryMap - Returns the first (lowest) period currently in this temporal map.
- Specified by:
firstPeriodin interfaceTemporalUnaryMap
lastPeriod
public abstract Period lastPeriod()
- Description copied from interface:
TemporalUnaryMap - Returns the last (highest) period currently in this temporal map.
- Specified by:
lastPeriodin interfaceTemporalUnaryMap
subMap
public abstract TemporalUnaryMap subMap(Period p)
- Specified by:
subMapin interfaceTemporalUnaryMap
putAll
public boolean putAll(TemporalUnaryMap tm)
- Description copied from interface:
TemporalUnaryMap - Copies all of the mappings from the specified map to this map
(optional operation). These mappings will replace any mappings that
this map had for any of the periods currently in the specified map.
- Specified by:
putAllin interfaceTemporalUnaryMap
extent
public Period extent()
- Description copied from interface:
TemporalUnaryMap - Returns a period enclosing firstInstant() and lastInstant()
- Specified by:
extentin interfaceTemporalUnaryMap
equalContent
public boolean equalContent(java.lang.Object o)
- Compares the specified object with this map for content equality.
Returns
true if the given object contains the same mappings.
This implementation first checks if the specified object is this map; if so it returns true. Then, it checks if the specified object is a map whose size is identical to the size of this set; if not, it it returns false. If so, it iterates over this map's Periods and Values, and checks them for equality.
The method equals is not overridden in order to keep the default hashcode() method. Overriding hashcode() would lead to poor performances when adding this map to a hashmap (which is done by the TemporalMultiMap).
|
|||||||||
| Home >> All >> [ jtemporal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
jtemporal.AbstractTemporalUnaryMap