| Home >> All |
| | jtemporal.util.* (4) |
jtemporal: Javadoc index of package jtemporal.
Package Samples:
jtemporal.util
Classes:
TreeTemporalMultiMap: Maintains internally a TreeMap over the periods and an HashMap over the values so that query performances are acceptable for queries in both dimensions even when the collection is very large. Note: this implementation is not synchronized. If multiple threads access the map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more mappings; merely changing the value associated with an existing key is not a structural modification.) This is typically accomplished by ...
TreeTemporalUnaryMap: Uses internally a TreeMap to store the mappings. The Periods as used as keys. Links at any time an object (the map holder) to zero or one object (value), example: Employee-Salary. You can get the value valid at a given time with the method Object get(Instant i). To add a mapping, you do not specify an Instant, but a Period specifying the validity of the object. If another object exists valid during this period, the validity will be overwritten for new object period. Note that this implementation is not synchronized. If multiple threads access a map concurrently, and at least one of the threads ...
Instant: You must implement this interface (basically a Comparable) to represent time. The implementing object must be immutable. If you are in nuclear particle research you won't use the same class as if you are a geologist. You can write a little adapter wrapping java.util.Date. Most users rether use "pure" dates, to avoid issues with timezones. There are many opensource implementations of Julian date and of Gregorian date. Many companies have their own date/calendar framework. For example, in my unit test classes, I have simply adapted an int. Any object implementing this interface is required to be ...
MapSubscriber: This interface is a minimal specification, to allow a MapSubscriber call-back to reach the best possible performances. For this reason there is ony one subscriber, and no event objects are created. If you need standard events and listeners, then you should create a gateway object, which is subscriber. This object will then instantiate and distribute the events to the listeners. The performance cost of having one more intermediate object is negligible compared to the cost of instantiating events and sending them to multiple listeners.
TimeNode: A TimeNode holds a State which can be a SingleElementState or a HashState (state pattern). The goal of the of a "lazy collection" is to delay the instatiation of the heavy part (HashMap) until a second element is added to the collection. That increases performances in a system where many collection contains only one element. A SingleElementState contains one and only one TimedObject, A HashState contains 1 or more TimedObjects. As soon a Node is empty, it asks the parent to be removed and is then garbaged.
PublishedSortedMap: Decorates a SortedMap allowing a single third object to subscribe to updates. That's more efficient in terms of performance than using events and listeners. If you need events and multiple listener, you need to create an intermediate map subscriber class, which creates and dispatches the events. This class is optimized for the jtemporal use, that's why the class is not public (also some methods not used by JTemporal are not implemented). However with minimal changes, this class can become generic.
TemporalMultiMap: Associates at any time an object (the map holder) to zero to many objects (values), for example: Employee-Skill. You can get the set of values valid at a given time by calling the method Set valueSet(Instant key). To add a mapping, you do not specify an Instant, but a Period specifying the validity of the object. Note: the Object value (passed to many methods) must have equals and hashCode defined consistently, as described in the java.lang.Object documentation.
TemporalUnaryMap: Links at any time an object (the map holder) to zero or one object (value), example: Employee-Salary. You can get the value valid at a given time with the method Object get(Instant i). To add a mapping, you do not specify an Instant, but a Period specifying the validity of the object. If another object exists valid during this period, the validity will be overwritten for new object period.
Period: Represents a "half-open" immutable time range (which includes the start instant, but not the end instant). It does not implement Cloneable, because there is no reason to clone an immutable object.
TimedObject: Associates a period to an Object. The semantics of the period is free. Is immutable when the value is also immutable.
EmptyIterator: Immutable empty read-only iterator (singleton). For methods description, see java.util.Iterator
ReadOnlySet: Set proxy, restricting operations to read-only. For methods description, see java.util.Set
EmptySet: Immutable empty read-only set (singleton). For methods description, see java.util.Set
TreeMapCopy: Title: JTemporal Description: Copyright: Copyright (c) 2002 Company:
NodeParent: Title: JTemporal Description: Copyright: Copyright (c) 2002 Company:
AbstractTemporalMultiMap: Features common to the MultiMaps.
AbstractTemporalUnaryMap: Features common to the UnaryMaps.
AllTests: Package JUnit test suite
| Home | Contact Us | Privacy Policy | Terms of Service |