COMP2396
Loading...
Searching...
No Matches
SharedNumber Class Reference
Collaboration diagram for SharedNumber:

Public Member Functions

 SharedNumber ()
 
synchronized void down ()
 
synchronized int getNumber ()
 
synchronized void up ()
 

Private Attributes

int n
 

Detailed Description

Definition at line 2 of file SharedNumber.java.

Constructor & Destructor Documentation

◆ SharedNumber()

SharedNumber.SharedNumber ( )
inline

Definition at line 5 of file SharedNumber.java.

5 {
6 this.n = 0;
7 }

Member Function Documentation

◆ down()

synchronized void SharedNumber.down ( )
inline

Definition at line 13 of file SharedNumber.java.

13 {
14 n--;
15 }

References n.

Referenced by Server.Handler.run().

Here is the caller graph for this function:

◆ getNumber()

synchronized int SharedNumber.getNumber ( )
inline

Definition at line 17 of file SharedNumber.java.

17 {
18 return n;
19 }

References n.

Referenced by Server.Handler.run().

Here is the caller graph for this function:

◆ up()

synchronized void SharedNumber.up ( )
inline

Definition at line 9 of file SharedNumber.java.

9 {
10 n++;
11 }

References n.

Referenced by Server.Handler.run().

Here is the caller graph for this function:

Member Data Documentation

◆ n

int SharedNumber.n
private

Definition at line 3 of file SharedNumber.java.

Referenced by down(), getNumber(), and up().


The documentation for this class was generated from the following file: