1 9 package org.ozoneDB.DxLib; 10 11 import java.io.*; 12 13 14 public class DxLong extends DxObject implements Externalizable { 15 16 final static long serialVersionUID = 1L; 17 18 long value = 0; 19 20 21 public DxLong() { 22 } 23 24 25 public DxLong( long v ) { 26 value = v; 27 } 28 29 30 public DxLong( DxLong v ) { 31 super(); 32 value = v.value; 33 } 34 35 36 public Object clone() { 37 return new DxLong( value ); 38 } 39 40 41 public boolean equals( Object obj ) { 42 return value == ((DxLong)obj).value; 43 } 44 45 46 public boolean isLess( DxCompatible obj ) { 47 return value < ((DxLong)obj).value; 48 } 49 50 51 public String toString() { 52 return Long.toString( value ); 53 } 54 55 56 public long toLong() { 57 return value; 58 } 59 60 61 public int hashCode() { 62 return (int)value; 64 } 65 66 67 public void writeExternal( ObjectOutput out ) throws IOException { 68 out.writeLong( value ); 69 } 70 71 72 public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { 73 value = in.readLong(); 74 } 75 } 76 | Popular Tags |