Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/arranger/jarl/test/frac/IntWrapper.java


1   ////////////////////////////////////////////////////////////////////////////////
2   // IntWrapper Class ////////////////////////////////////////////////////////////
3   ////////////////////////////////////////////////////////////////////////////////
4   // Copyright 2000 - David Leberknight - Anyone may use this code for any reason
5   // at any time, provided that they give an appropriate reference to this source,
6   // and send David some email ( david@leberknight.com ).
7   //
8   // The class Integer is immutable; this isn't.
9   // The primative int is passed by value; this is passed by reference.
10  
11  package com.arranger.jarl.test.frac;
12  
13  public class IntWrapper {
14      private int theValue;
15  
16      public IntWrapper(int i) {
17          theValue = i;
18      }
19  
20      public void setValue(int i) {
21          theValue = i;
22      }
23  
24      public int getValue() {
25          return theValue;
26      }
27  
28      public boolean equals(int i) {
29          if (theValue == i) {
30              return true;
31          }
32          return false;
33      }
34  }