|
Pig Latin Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cs101.util.Coerce
Coerce implements some coercion utilities for a variety of java classes.
This file was created for Rethinking CS101 project of Lynn Andrea Stein's AP Group at the MIT Artificial Intelligence Laboratory.
Copyright 1996 Massachusetts Institute of Technology
String
,
Double
,
Color
Method Summary | |
static java.lang.Object |
newInstanceByClassname(java.lang.String s)
Given a String representing the name of a class, returns an initilized instance of the corresponding class (as an object). |
static java.awt.Color |
stringToColor(java.lang.String colorName)
Given a string representing the name of one of java's built-in colors, returns the corresponding Color object. |
static double |
stringToDouble(java.lang.String s)
Given a string representing a floating point number, returns the corresponding (unwrapped) double. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final double stringToDouble(java.lang.String s)
s
- A string representing a floating point number.
public static final java.awt.Color stringToColor(java.lang.String colorName)
colorName
- A string representing a java Color.
public static final java.lang.Object newInstanceByClassname(java.lang.String s) throws CreationException
CreationException
|
Pig Latin Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |