Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Création du dépôt AIL-PA
[ail-pa.git] / src / and / AIL / MessageInt.java
1 package and.AIL ;
2
3 /**
4  * Class which contains the Object of the message (integer, double, tabular...)
5  * and the tag associated to this message.
6  * @author Sébastien Miquée
7  * @version 3.0
8  */
9 public class MessageInt extends Message
10 {
11         /**
12          * 
13          */
14         private static final long serialVersionUID = 1L;
15         /** Local variables **/
16         private int i ;
17
18         /**
19          * Empty constructor for the Stub generation.
20          */
21         public MessageInt() {}
22         
23         /**
24          * Constructor.
25          * For Message which contains an Integer.
26          * @param _tag : tag of the Message.
27          * @param _o : the Integer object.
28          */
29         public MessageInt( int _id, int _tag, int _o )
30         {
31                 super() ;
32                 sender = (short)_id ;
33                 tag = (short)_tag ;
34                 i = _o ;
35                 type = 0 ;
36         }
37         
38         public MessageInt( int _tag, int _o )
39         {
40                 super() ;
41                 sender = -1 ;
42                 tag = (short)_tag ;
43                 i = _o ;
44                 type = 0 ;
45         }
46         
47         /**
48          * Returns the integer value.
49          * @return : the tabular of doubles of the Message.
50          */
51         public int getInt() 
52         {
53                 return i ;
54         }
55 }       
56
57 /** La programmation est un art, respectons ceux qui la pratiquent !! **/