Advertisement
karlicoss

OKAY

Oct 6th, 2011
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. /**
  2.  * Created by IntelliJ IDEA.
  3.  * User: karlicos
  4.  * Date: 07.10.11
  5.  * Time: 4:48
  6.  * To change this template use File | Settings | File Templates.
  7.  */
  8. public class MutableInteger
  9. {
  10.     private int value;
  11.     public MutableInteger()
  12.     {
  13.         value = 0;
  14.     }
  15.     public MutableInteger(int v)
  16.     {
  17.         value = v;
  18.     }
  19.     public int getValue()
  20.     {
  21.         return value;
  22.     }
  23.     public void setValue(int v)
  24.     {
  25.         value = v;
  26.     }
  27.     public void increment()
  28.     {
  29.         value++;
  30.     }
  31.     public String toString()
  32.     {
  33.         return Integer.toString(value);
  34.     }
  35. }
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement