// -----------------------------------------------------------------
// The following classes are defined in the standard java class
//   libraries,  and are described in the book:
//   "The Java(tm) Language Specification", by Gosling, Joy and Steele,
//   published by Addison-Wesley.   On-line copies of the book are
//   available via <http://java.sun.com/doc/language_specification.html>.
// -----------------------------------------------------------------

// java.lang.Object - Section 20.1, page 458
// see also joos.lib.JoosObject to get the wait method
extern public class Object in "java.lang" { 
  public Object();
  public String toString();
  public final void notify(); // throws IllegalMonitorStateException
  public final void notifyAll(); // throws IllegalMonitorStateException
  public boolean equals(Object obj);
}

// java.lang.Boolean - Section 20.4, page 469
extern public final class Boolean in "java.lang" {
  public Boolean(boolean value);
  public String toString();
  public boolean equals(Object obj);
  public boolean booleanValue();
}

// java.lang.Integer - Section 20.6, page 487
extern public final class Integer in "java.lang" {
  public Integer(int value);
  public String toString();
  public boolean equals(Object obj);
  public int intValue();
}

// java.lang.Runnable - page 319 in Java in a Nutshell
//   should be an interface, don't extend it in Joos programs, rather
//     extend JoosRunnable which is a real class - see joos.lib.JoosRunnable
extern public abstract class Runnable extends Object in "java.lang" {
 public Runnable();
 public abstract void run();
}

// java.lang.String - Section 20.12, page 531
extern public final class String in "java.lang" {
  public String(String value);
  public String toString();
  public boolean equals(Object obj);
  public int length();
  public boolean equalsIgnoreCase(String anotherString);
  public int compareTo(String anotherString);
  public boolean regionMatches(boolean ignoreCase, int toffset,
                       String other, int ooffset, int len);
  public boolean startsWith(String prefix, int toffset);
  public boolean endsWith(String suffix);
  public int indexOf(String str, int fromIndex);
  public int lastIndexOf(String str, int fromIndex);
  public String substring(int beginIndex, int endIndex);
  public String concat(String str);
  public String toLowerCase();
  public String toUpperCase();
  public String trim();
}

// java.lang.StringBuffer - Section 20.13
extern public class StringBuffer in "java.lang" {
  public StringBuffer();
  public String toString();
  public int length();
  public void setLength(int newLength);
  public int capacity();
  public void ensureCapacity(int minimumCapacity);
  public StringBuffer append(Object obj);
  public StringBuffer insert(int offset, Object obj);
  public StringBuffer reverse();
}

// java.lang.Thread - page 325 in Java in a Nutshell
// should be extends Object implements Runnable
// see also joos.lib.JoosThread
extern public class Thread extends Runnable in "java.lang" {
  public Thread(Runnable target);
  public void checkAccess(); // throws SecurityException (runtime)
  public int countStackFrames(); // throws IllegalThreadStateException (runtime)
  public final String getName();
  public final int getPriority();
  public final boolean isAlive();
  public final boolean isDaemon();
  public final void resume();
  public void run();
  public final void setDaemon(boolean on); // throws IllegalThreadStateException
  public final void setName(String name);
  public final void setPriority(int Priority); // throws IllegalArgumentExc
  public synchronized void start(); // throws IllegalThreadStateException 
  public final void stop();
  public final void suspend();
  public String toString(); // overrides Object.toString()
}

// java.util.BitSet - Section 21.2 - page 618  
extern public class BitSet in "java.util" {
  public BitSet(int nbits);
  public String toString();
  public boolean equals(Object obj);
  public boolean get(int bitIndex);
  public void set(int bitIndex);
  public void clear(int bitIndex);
  public void and(BitSet set);
  public void or(BitSet set);
  public void xor(BitSet set);
  public int size();
}

// java.util.Date - Section 21.3, page 622
extern public class Date in "java.util" {
  public Date(int year, int month, int date, 
                int hours, int minutes, int seconds);
  public String toString();
  public boolean equals(Object obj);
  public int getYear();
  public void setYear(int year);
  public int getMonth();
  public void setMonth(int month);
  public int getDate();
  public void setDate(int date);
  public int getDay();
  public int getHours();
  public void setHours(int hours);
  public int getMinutes();
  public int setMinutes(int minutes);
  public int getSeconds();
  public int setSeconds(int seconds);
  public boolean before(Date when);
  public boolean after(Date when);
  public String toLocaleString();
  public String toGMTString();
  public int getTimezoneOffset();
}

// java.util.Random - Section 21.9, page 646
extern public class Random in "java.util" {
  public Random();
  public int nextInt();
}

// java.util.StringTokenizer - Section 21.10, page 651
extern public class StringTokenizer in "java.util" {
  public StringTokenizer(String str, String delim, boolean returnTokens);
  public boolean hasMoreTokens();
  public String nextToken(String delim);
  public boolean hasMoreElements();
  public Object nextElement();
  public int countTokens();
}

// java.util.Vector - Section 21.11, page 654
extern public class Vector in "java.util" { // implements Cloneable
  public Vector(int initialCapacity, int capacityIncrement);
  public final String toString(); // overrides Object.toString()
  public final Object elementAt(int index);
  public final void setElementAt(Object obj, int index);
  public final Object firstElement();
  public final Object lastElement();
  public final void addElement(Object obj);
  public final void insertElementAt(Object obj, int index);
  public final boolean removeElement(Object obj);
  public final void removeElementAt(int index);
  public final void removeAllElements();
  public final boolean isEmpty();
  public final int size();
  public final void setSize(int newSize);
  public final int capacity();
  public final void ensureCapacity(int minCapacity);
  public final void trimToSize();
  public final boolean contains(Object elem);
  public final int indexOf(Object elem);
  public final int lastIndexOf(Object elem);
}
