Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.lang.time
Class DurationFormatUtils.Token  view DurationFormatUtils.Token download DurationFormatUtils.Token.java

java.lang.Object
  extended byorg.apache.commons.lang.time.DurationFormatUtils.Token
Enclosing class:
DurationFormatUtils

static class DurationFormatUtils.Token
extends java.lang.Object

Element that is parsed from the format pattern.


Field Summary
private  int count
           
private  java.lang.Object value
           
 
Constructor Summary
(package private) DurationFormatUtils.Token(java.lang.Object value)
          Wrap a token around a value.
(package private) DurationFormatUtils.Token(java.lang.Object value, int count)
          Wrap 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.
 
Method Summary
(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()
          Get the current number of values represented
(package private)  java.lang.Object getValue()
          Get the particular value this token represents.
(package private)  void increment()
          Add another one of the value
 java.lang.String toString()
          Represent this token as a String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private java.lang.Object value

count

private int count
Constructor Detail

DurationFormatUtils.Token

DurationFormatUtils.Token(java.lang.Object value)
Wrap a token around a value. A value would be something like a 'Y'.


DurationFormatUtils.Token

DurationFormatUtils.Token(java.lang.Object value,
                          int count)
Wrap 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.

Method Detail

containsTokenWithValue

static boolean containsTokenWithValue(DurationFormatUtils.Token[] tokens,
                                      java.lang.Object value)
Helper method to determine if a set of tokens contain a value


increment

void increment()
Add another one of the value


getCount

int getCount()
Get the current number of values represented


getValue

java.lang.Object getValue()
Get the particular value this token represents.


equals

public boolean equals(java.lang.Object obj2)
Supports equality of this Token to another Token.


toString

public java.lang.String toString()
Represent this token as a String.