|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.toy.TExampleManager
public class TExampleManager
TExampleManager is a class that reads the example manifest and loads all of the examples into memory, parsing their titles as well.
Field Summary | |
---|---|
static String |
EXAMPLE_MANIFEST_FILE
The filename of the example manifest. |
Method Summary | |
---|---|
static int |
getExampleCount()
Returns the number of examples which have been sucessfully loaded. |
static String |
getExampleText(int index)
Returns the program text of the requested example. |
static String |
getExampleTitle(int index)
Returns the title of the requested example. |
static boolean |
isReady()
Indicates wheter or not each example in the manifest either does not exist or has been loaded and processed. |
void |
run()
Implement the Runnable interface to load the example files in a separate thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EXAMPLE_MANIFEST_FILE
Method Detail |
---|
public static boolean isReady()
public static int getExampleCount()
public static String getExampleTitle(int index)
index
- The index of the requested title. An ArrayIndexOutOfBounds exception will be
thrown if the index is invalid.
public static String getExampleText(int index)
index
- The index of the requested title. An ArrayIndexOutOfBounds exception will be
thrown if the index is invalid.
public void run()
run
in interface Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |