home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _527EB6F4270D49EAB9F3F4E5179E5536 < prev    next >
Encoding:
Text File  |  2003-04-03  |  1.3 KB  |  68 lines

  1. /**
  2.  * SchemaLong.java
  3.  *
  4.  * This file was generated by XMLSPY 5 Enterprise Edition.
  5.  *
  6.  * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
  7.  * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
  8.  *
  9.  * Refer to the XMLSPY Documentation for further details.
  10.  * http://www.altova.com/xmlspy
  11.  */
  12.  
  13. package com.altova.xml.types;
  14.  
  15. public class SchemaLong implements SchemaType {
  16.     protected long value;
  17.  
  18.     public SchemaLong(long newvalue) {
  19.         value = newvalue;
  20.     }
  21.  
  22.     public SchemaLong(String newvalue) {
  23.         value = Long.parseLong(newvalue);
  24.     }
  25.  
  26.     public long getValue() {
  27.         return value;
  28.     }
  29.  
  30.     public void setValue(long newvalue) {
  31.         value = newvalue;
  32.     }
  33.  
  34.     public void setValue(String newvalue) {
  35.         value = Long.parseLong(newvalue);
  36.     }
  37.  
  38.     public int hashCode() {
  39.         return (int)value;
  40.     }
  41.  
  42.     public boolean equals(Object obj) {
  43.         if (!(obj instanceof SchemaLong))
  44.             return false;
  45.         return value == ((SchemaLong)obj).value;
  46.     }
  47.  
  48.     public Object clone() {
  49.         return new SchemaLong(value);
  50.     }
  51.  
  52.     public String toString() {
  53.         return Long.toString(value);
  54.     }
  55.  
  56.     public String asString() {
  57.         return toString();
  58.     }
  59.  
  60.     public int compareTo(Object obj) {
  61.         return compareTo((SchemaLong)obj);
  62.     }
  63.  
  64.     public int compareTo(SchemaLong obj) {
  65.         return new Long(value).compareTo(new Long(obj.value));
  66.     }
  67. }
  68.