|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tomgibara.pronto.config.source.LastModifiedCalculator
public final class LastModifiedCalculator
Instances of this class can compute accurate values for lastModified from property maps alone. The property maps supplied to these objects are not modified and are copied if their values need to be recorded by this object. The copies made in this way are available via the getProperties() method.
| Constructor Summary | |
|---|---|
LastModifiedCalculator()
Initializes the object without a known last modified date or known properties. |
|
LastModifiedCalculator(java.util.Map<java.lang.String,java.lang.String> properties,
long lastModified)
After calling this constructor, the lastModified field will equal the supplied lastModified date and the properties field will contain a copy of the supplied properties. |
|
| Method Summary | |
|---|---|
long |
getLastModified()
Returns the lastModified date maintained by this object. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns a copy of the last supplied properties which had changed. |
void |
update(java.util.Map<java.lang.String,java.lang.String> properties)
Computes the lastModified field of this object based on the supplied map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LastModifiedCalculator()
public LastModifiedCalculator(java.util.Map<java.lang.String,java.lang.String> properties,
long lastModified)
properties - the initial properties for this object, not nulllastModified - the known last modification date for the supplied properties,
not negative| Method Detail |
|---|
public void update(java.util.Map<java.lang.String,java.lang.String> properties)
properties - a new collection of properties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the update method has not yet been called
public long getLastModified()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the update method has not yet been called
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||