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

Quick Search    Search Deep

javatools.util
Class OrdinalPostfix  view OrdinalPostfix download OrdinalPostfix.java

java.lang.Object
  extended byjavatools.util.OrdinalPostfix

public class OrdinalPostfix
extends java.lang.Object

This class returns the bit that you tag onto the end of number. e.g. if you pass in the number "1" it will return "st", as in 1st. If you pass in "2" it will return "nd", as in "2nd". etc. Yes, the name is pretty wierd, but what can you name something like this?

Version:
0.7

Field Summary
(package private) static java.lang.String nd
          Contains "nd".
(package private) static java.lang.String rd
          Contains "rd".
(package private) static java.lang.String st
          Contains "st".
(package private) static java.lang.String th
          Contains "th".
 
Constructor Summary
OrdinalPostfix()
           
 
Method Summary
static java.lang.String postfix(int number)
          Returns the correct postfix string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

st

static final java.lang.String st
Contains "st".

See Also:
Constant Field Values

nd

static final java.lang.String nd
Contains "nd".

See Also:
Constant Field Values

rd

static final java.lang.String rd
Contains "rd".

See Also:
Constant Field Values

th

static final java.lang.String th
Contains "th".

See Also:
Constant Field Values
Constructor Detail

OrdinalPostfix

public OrdinalPostfix()
Method Detail

postfix

public static java.lang.String postfix(int number)
Returns the correct postfix string.