1 29 package org.jruby.javasupport.test; 30 31 public class TestIntWrapperImpl 32 implements TestIntWrapper 33 { 34 private long n = 0; 35 36 public TestIntWrapperImpl (long n) { 37 this.n = n; 38 } 39 40 public long getInteger () { 41 return n; 42 } 43 44 public String toString () { 45 return "<java: " + n + ">"; 46 } 47 48 public boolean equals (Object o) { 49 if (o instanceof TestIntWrapper) { 50 return this.getInteger() == ((TestIntWrapper)o).getInteger(); 51 } 52 return false; 53 } 54 } 55 | Popular Tags |