|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.avian.util.MilliTimeString
public class MilliTimeString
Utility object that provides several convenience methods for converting and displaying long values as unformatted or formatted Strings. Unfortunately, long numbers produce way too many digits in a String for the human brain to comprehend easily or manage conveniently. This utility object provides several convenience methods to display long numbers as Strings, including one unformatted String and two formatted Strings. Formatting reduces the number of digits and inserts punctuation to separate the digits into smaller groups that are easier to understand.
It is common to have these types of utilities provided as static methods to improve system efficiency. However, using statics would require that all of the methods be synchronized so that two birds don't access the same method at the same time and corrput each other's results.
Constructor Summary | |
---|---|
MilliTimeString()
|
Method Summary | |
---|---|
java.lang.String |
getShortMilliTimeString()
Gets the current system millisecond time and returns a shortened formatted String. |
java.lang.String |
toMilliTimeString()
Gets the current system millisecond time and returns the whole thing as an unformatted String. |
java.lang.String |
toShortMilliTimeString(long t)
Receives a long number and returns a shortened formatted String that represent that long number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MilliTimeString()
Method Detail |
---|
public java.lang.String toMilliTimeString()
public java.lang.String getShortMilliTimeString()
public java.lang.String toShortMilliTimeString(long t)
t
- A long number to be converted into a String and formatted and shortened.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |