You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class calypso.util.Abacus

java.lang.Object
   |
   +----calypso.util.Abacus

A class for counting in a variety of bases.


public class  Abacus
     extends java.lang.Object
{
          // Fields 9
     public static final String[] bases;
     protected static final String gAlphaChars;
     protected static final String gBinaryChars;
     protected static final String gHexChars;
     protected static final String gRomanCharsA;
     protected static final String gRomanCharsB;
     public static final String[] ones;
     public static final String[] teens;
     public static final String[] tens;

          // Constructors 1
     public Abacus();

          // Methods 9
     public static void PadPrint(int, int);
     public static void PadPrint(String, int);
     public static String getAlphaString(int);
     public static String getBinaryString(int);
     public static String getHexString(int);
     public static String getRomanString(int);
     public static String getSeriesString(int, String, int, int);
     public static String getSpokenString(int);
     public static void main(String[]);
}



Fields


ones

   public static final String[] ones

Formatting Strings


teens

   public static final String[] teens


tens

   public static final String[] tens


bases

   public static final String[] bases


gAlphaChars

   protected static final String gAlphaChars


gRomanCharsA

   protected static final String gRomanCharsA


gRomanCharsB

   protected static final String gRomanCharsB


gHexChars

   protected static final String gHexChars


gBinaryChars

   protected static final String gBinaryChars



Constructors


Abacus

   public Abacus() 

Default constructor




Methods


getAlphaString

   public static String getAlphaString(int aValue) 

Formats the value as an alpha string



getRomanString

   public static String getRomanString(int aValue) 

Convert the given integer value into a roman numeral string

Parameter Description
aValue - int to be converted to roman

Returns:
new string


getHexString

   public static String getHexString(int aValue) 

Convert the given integer value into a hexstring

Parameter Description
aValue - int to be converted to hex string

Returns:
new string


getBinaryString

   public static String getBinaryString(int aValue) 

Convert the given integer value into a string of binary digits

Parameter Description
aValue - int to be converted to binary string

Returns:
new string


getSpokenString

   public static String getSpokenString(int aValue) 

Convert the given integer value into spoken string (one, two, three...)

Parameter Description
aValue - int to be converted to hex string

Returns:
new stringbuffer


getSeriesString

   public static String getSeriesString(int aValue, 
                                        String aCharSet, 
                                        int anOffset, 
                                        int aBase) 

Convert the given integer value into a series string. These are any arbitrary but repeating pattern of characters.

Parameter Description
aValue - int to be converted to series string

Returns:
new string


PadPrint

   public static void PadPrint(int aValue, 
                               int width) 


PadPrint

   public static void PadPrint(String aString, 
                               int aWidth) 


main

   public static void main(String[] argv) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4