static class DurationFormatUtils.Token
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
count |
private java.lang.Object |
value |
Constructor and Description |
---|
Token(java.lang.Object value)
Wraps a token around a value.
|
Token(java.lang.Object value,
int count)
Wraps a token around a repeated number of a value, for example it would
store 'yyyy' as a value for y and a count of 4.
|
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
containsTokenWithValue(DurationFormatUtils.Token[] tokens,
java.lang.Object value)
Helper method to determine if a set of tokens contain a value
|
boolean |
equals(java.lang.Object obj2)
Supports equality of this Token to another Token.
|
(package private) int |
getCount()
Gets the current number of values represented
|
(package private) java.lang.Object |
getValue()
Gets the particular value this token represents.
|
int |
hashCode()
Returns a hash code for the token equal to the
hash code for the token's value.
|
(package private) void |
increment()
Adds another one of the value
|
java.lang.String |
toString()
Represents this token as a String.
|
Token(java.lang.Object value)
value
- to wrapToken(java.lang.Object value, int count)
value
- to wrapcount
- to wrapstatic boolean containsTokenWithValue(DurationFormatUtils.Token[] tokens, java.lang.Object value)
tokens
- set to look invalue
- to look fortrue
if containedvoid increment()
int getCount()
java.lang.Object getValue()
public boolean equals(java.lang.Object obj2)
equals
in class java.lang.Object
obj2
- Object to consider equality oftrue
if equalpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object