planty
Class PlantList

java.lang.Object
  extended by planty.PlantList

public class PlantList
extends java.lang.Object

A list of precreated plants to ease plant creation.

Author:
Nereare

Field Summary
static Sprouling[] plants
          An array of plants.
 
Constructor Summary
PlantList()
           
 
Method Summary
private static void echo()
          Prints an empty line in the default PrintStream.
private static void echo(java.lang.Object o)
          Prints the given content.
private static void echoErr(java.lang.Object o)
           
static Sprouling loadFromList()
          Loads a plant from the list registered.
private static java.lang.String read()
          Executes a line-reading of the default InputStream.
private static int readInt()
           
private static boolean yes()
          Reades the default InputStream for an "yes" or "no".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plants

public static final Sprouling[] plants
An array of plants. They have no name, and it must be explictly set.

Constructor Detail

PlantList

public PlantList()
Method Detail

read

private static java.lang.String read()
Executes a line-reading of the default InputStream.

Returns:
either the data inputed to the command-line or null in case of error.

readInt

private static int readInt()

yes

private static boolean yes()
Reades the default InputStream for an "yes" or "no".

Returns:
false if the user input "n", true otherwise.

echo

private static void echo()
Prints an empty line in the default PrintStream.


echo

private static void echo(java.lang.Object o)
Prints the given content.

Parameters:
o - something to print.

echoErr

private static void echoErr(java.lang.Object o)

loadFromList

public static Sprouling loadFromList()
Loads a plant from the list registered.

Returns:
a Sprouling.