Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gecco.server.clock
Class SleepingThread

    java.lang.Object
      gecco.server.clock.SleepingThread

All Implemented Interfaces:
  Comparable

public class SleepingThread
extends Object
implements Comparable

Description of the Class

Author:
  Karl Hasselström

Field Summary
`Thread` | `thread` Description of the Field
`double` | `wakeupTime` Description of the Field

Constructor Summary
`SleepingThread(Thread thread, double wakeupTime)` Constructor for the SleepingThread object

Method Summary
`int` | `compareTo(Object other)` Compares this sleeping thread with another sleeping thread.
`boolean` | `equals(Object other)` Tests whether two sleeping threads are equal.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### thread

    public Thread thread

  Description of the Field

### wakeupTime

    public double wakeupTime

  Description of the Field

Constructor Detail

### SleepingThread

    public SleepingThread(Thread thread,
                          double wakeupTime)

  Constructor for the SleepingThread object

Parameters:
  `thread` - Description of Parameter
  `wakeupTime` - Description of Parameter

Method Detail

### equals

    public boolean equals(Object other)

  Tests whether two sleeping threads are equal.

  Parameters:
    `other` - Should be a `SleepingThread` .
  Returns:
    `true` if a is equal to this automaton, `false` otherwise.

### compareTo

    public int compareTo(Object other)

  Compares this sleeping thread with another sleeping thread. First, their wakeup times are compared, and if they are equal, the threads themselves are compared.

  Specified by:
    `compareTo` in interface `Comparable`
  Parameters:
    `other` - Should be a `SleepingThread` .
  Returns:
    -1 if `this` is less than `other` , 0 if they are equal, 1 if `this` is greater than `other` .

### toString

    public String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD