Class ThreadCounter

java.lang.Object
  extended by ThreadCounter

public class ThreadCounter
extends java.lang.Object

Trida ThreadCounter, pro kontrolu delniku

Author:
Pavel

Field Summary
private  int counter
           
private  java.lang.Object lock
           
private  int threadNo
           
 
Constructor Summary
ThreadCounter(int threadNo)
           
 
Method Summary
 void increment()
          inkrementuje citac vlaken
 void waitForAll()
          pocka na ukonceni vsech vlaken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

private int counter

threadNo

private int threadNo

lock

private java.lang.Object lock
Constructor Detail

ThreadCounter

public ThreadCounter(int threadNo)
Method Detail

waitForAll

public void waitForAll()
pocka na ukonceni vsech vlaken


increment

public void increment()
inkrementuje citac vlaken