Class Philosopher

java.lang.Object
jadex.micro.philosophers.thread.Philosopher
All Implemented Interfaces:
Runnable

public class Philosopher extends Object implements Runnable
  • Field Details

    • state

      protected PhilosopherState state
    • r

      protected Random r
    • no

      protected int no
    • t

      protected Table t
    • eatcnt

      protected int eatcnt
    • mythread

      protected Thread mythread
  • Constructor Details

    • Philosopher

      public Philosopher(int no, Table t)
  • Method Details

    • run

      public void run()
      Implement me
      Specified by:
      run in interface Runnable
    • getState

      public PhilosopherState getState()
    • setState

      public void setState(PhilosopherState state)
    • getEatCnt

      public int getEatCnt()
    • getMyThread

      public Thread getMyThread()
    • getNo

      public int getNo()
    • doSleepRandom

      protected void doSleepRandom()
    • doSleepRandom

      protected void doSleepRandom(long time)
    • doSleep

      protected void doSleep(long time)
      Implement me
    • notifyPhilosopher

      public void notifyPhilosopher(long time)