|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object NGP.Utilities
Contains a number of "utility" methods to help in programming.
Method Summary | |
static URL |
createURL(String url)
Create a URL object from a String . |
static Color |
randomColor()
Generate a random Color |
static int |
randomNumber(int low,
int high)
Generate a random integer between the two parameters (inclusive) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int randomNumber(int low, int high)
low
- the lower boundhigh
- the upper bound
int
between low and high (inclusive)public static Color randomColor()
Color
Color
public static URL createURL(String url)
URL
object from a String
.
Pass the String
in as if you were
typing it into a web browser (i.e., fully qualified), e.g.,
http://www.cs.brown.edu/courses/cs015
or
file:/pro/web/web/courses/cs015/home.html
.
url
- the String
representing the actual address
URL
object (null if badly formed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |