org.gjt.universe
Class Util

java.lang.Object
  |
  +--org.gjt.universe.Util

public final class Util
extends java.lang.Object


Field Summary
private static java.lang.String[] greekChars
           
static int[] ZeroIntArray
           
static java.lang.String[] ZeroStringArray
           
 
Constructor Summary
private Util()
           
 
Method Summary
static java.lang.String fillBlanks(java.lang.String str, int size)
          This function is to replace the Format class in 1.1
static java.lang.String[] getCivNames()
          Gets the civ names for every civ, including computer players.
static java.lang.String[] getCivRaceNames()
          Gets the race names (not object!) for every civ, including computer players.
static java.lang.String getHash(java.lang.String text, java.lang.String algorithm)
          Gets a hash, using a defined algorithm.
static java.lang.String getHashMD5(java.lang.String text)
          Returns the MD5 hash of the given text.
static java.lang.String getHashSHA(java.lang.String text)
          Returns the SHA hash of the given text.
static java.lang.String Greek(int value)
           
static java.lang.String Roman(int value)
           
static java.lang.String toTitleCase(java.lang.String in)
          Capitalizes a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZeroStringArray

public static final java.lang.String[] ZeroStringArray

ZeroIntArray

public static final int[] ZeroIntArray

greekChars

private static java.lang.String[] greekChars
Constructor Detail

Util

private Util()
Method Detail

Roman

public static java.lang.String Roman(int value)

Greek

public static java.lang.String Greek(int value)

getCivNames

public static java.lang.String[] getCivNames()
Gets the civ names for every civ, including computer players.


getCivRaceNames

public static java.lang.String[] getCivRaceNames()
Gets the race names (not object!) for every civ, including computer players.


toTitleCase

public static java.lang.String toTitleCase(java.lang.String in)
Capitalizes a string. If the string is made of many words, only the first letter of the first word is capitalized.


getHash

public static java.lang.String getHash(java.lang.String text,
                                       java.lang.String algorithm)
Gets a hash, using a defined algorithm. if the algorithm is unavailable, a run-time exception is thrown.


getHashMD5

public static java.lang.String getHashMD5(java.lang.String text)
Returns the MD5 hash of the given text. MD5 hashes are 16 bytes (128 bits) in length.


getHashSHA

public static java.lang.String getHashSHA(java.lang.String text)
Returns the SHA hash of the given text. SHA hashes are 20 bytes (160 bits) in length.


fillBlanks

public static java.lang.String fillBlanks(java.lang.String str,
                                          int size)
This function is to replace the Format class in 1.1



Copyright © 2001 Universe Dev Team All Rights Reserved.