private static final class RelativeTimePatternConverter.CachedTimestamp
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
formatted
Cached formatted timestamp.
|
private long |
timestamp
Cached timestamp.
|
Constructor and Description |
---|
CachedTimestamp(long timestamp,
java.lang.String formatted)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
format(long newTimestamp,
java.lang.StringBuffer toAppendTo)
Appends the cached formatted timestamp to the buffer if timestamps match.
|
private final long timestamp
private final java.lang.String formatted
public CachedTimestamp(long timestamp, java.lang.String formatted)
timestamp
- timestamp.formatted
- formatted timestamp.public boolean format(long newTimestamp, java.lang.StringBuffer toAppendTo)
newTimestamp
- requested timestamp.toAppendTo
- buffer to append formatted timestamp.