org.x4juli.formatter.pattern
Class RelativeTimePatternConverter.CachedTimestamp

java.lang.Object
  extended byorg.x4juli.formatter.pattern.RelativeTimePatternConverter.CachedTimestamp
Enclosing class:
RelativeTimePatternConverter

private static final class RelativeTimePatternConverter.CachedTimestamp
extends java.lang.Object

Cached timestamp and formatted value.

Since:
0.5

Field Summary
private  java.lang.String formatted
          Cached formatted timestamp.
private  long timestamp
          Cached timestamp.
 
Constructor Summary
RelativeTimePatternConverter.CachedTimestamp(long timestamp, java.lang.String formatted)
          Creates a new instance.
 
Method Summary
 boolean format(long newTimestamp, java.lang.StringBuffer toAppendTo)
          Appends the cached formatted timestamp to the buffer if timestamps match.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

timestamp

private final long timestamp
Cached timestamp.


formatted

private final java.lang.String formatted
Cached formatted timestamp.

Constructor Detail

RelativeTimePatternConverter.CachedTimestamp

public RelativeTimePatternConverter.CachedTimestamp(long timestamp,
                                                    java.lang.String formatted)
Creates a new instance.

Parameters:
timestamp - timestamp.
formatted - formatted timestamp.
Method Detail

format

public boolean format(long newTimestamp,
                      java.lang.StringBuffer toAppendTo)
Appends the cached formatted timestamp to the buffer if timestamps match.

Parameters:
newTimestamp - requested timestamp.
toAppendTo - buffer to append formatted timestamp.
Returns:
true if requested timestamp matched cached timestamp.
Since:
0.5

toString

public java.lang.String toString()

Since:
0.5


${license_html}