[armedbear-cvs] r11486 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Dec 27 00:32:27 UTC 2008


Author: ehuelsmann
Date: Sat Dec 27 00:32:26 2008
New Revision: 11486

Log:
Add @Override annotations.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Bignum.java
   trunk/abcl/src/org/armedbear/lisp/Fixnum.java

Modified: trunk/abcl/src/org/armedbear/lisp/Bignum.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Bignum.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Bignum.java	Sat Dec 27 00:32:26 2008
@@ -54,11 +54,13 @@
     value = new BigInteger(s, radix);
   }
 
+  @Override
   public Object javaInstance()
   {
     return value;
   }
 
+  @Override
   public LispObject typeOf()
   {
     if (value.signum() > 0)
@@ -67,11 +69,13 @@
     return Symbol.BIGNUM;
   }
 
+  @Override
   public LispObject classOf()
   {
     return BuiltInClass.BIGNUM;
   }
 
+  @Override
   public LispObject typep(LispObject type) throws ConditionThrowable
   {
     if (type instanceof Symbol)
@@ -118,36 +122,43 @@
     return super.typep(type);
   }
 
+  @Override
   public LispObject NUMBERP()
   {
     return T;
   }
 
+  @Override
   public boolean numberp()
   {
     return true;
   }
 
+  @Override
   public LispObject INTEGERP()
   {
     return T;
   }
 
+  @Override
   public boolean integerp()
   {
     return true;
   }
 
+  @Override
   public boolean rationalp()
   {
     return true;
   }
 
+  @Override
   public boolean realp()
   {
     return true;
   }
 
+  @Override
   public boolean eql(LispObject obj)
   {
     if (this == obj)
@@ -160,6 +171,7 @@
     return false;
   }
 
+  @Override
   public boolean equal(LispObject obj)
   {
     if (this == obj)
@@ -172,6 +184,7 @@
     return false;
   }
 
+  @Override
   public boolean equalp(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Bignum)
@@ -183,6 +196,7 @@
     return false;
   }
 
+  @Override
   public LispObject ABS()
   {
     if (value.signum() >= 0)
@@ -190,46 +204,55 @@
     return new Bignum(value.negate());
   }
 
+  @Override
   public LispObject NUMERATOR()
   {
     return this;
   }
 
+  @Override
   public LispObject DENOMINATOR()
   {
     return Fixnum.ONE;
   }
 
+  @Override
   public boolean evenp() throws ConditionThrowable
   {
     return !value.testBit(0);
   }
 
+  @Override
   public boolean oddp() throws ConditionThrowable
   {
     return value.testBit(0);
   }
 
+  @Override
   public boolean plusp()
   {
     return value.signum() > 0;
   }
 
+  @Override
   public boolean minusp()
   {
     return value.signum() < 0;
   }
 
+  @Override
   public boolean zerop()
   {
     return false;
   }
 
+  @Override
   public int intValue()
   {
     return value.intValue();
   }
 
+  @Override
   public long longValue()
   {
     return value.longValue();
@@ -267,21 +290,25 @@
       }
   }
 
+  @Override
   public final LispObject incr()
   {
     return number(value.add(BigInteger.ONE));
   }
 
+  @Override
   public final LispObject decr()
   {
     return number(value.subtract(BigInteger.ONE));
   }
 
+  @Override
   public LispObject add(int n) throws ConditionThrowable
   {
     return number(value.add(BigInteger.valueOf(n)));
   }
 
+  @Override
   public LispObject add(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -307,6 +334,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject subtract(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -333,6 +361,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject multiplyBy(int n) throws ConditionThrowable
   {
     if (n == 0)
@@ -342,6 +371,7 @@
     return new Bignum(value.multiply(BigInteger.valueOf(n)));
   }
 
+  @Override
   public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -373,6 +403,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject divideBy(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -401,6 +432,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public boolean isEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Bignum)
@@ -416,6 +448,7 @@
     return false;
   }
 
+  @Override
   public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Bignum)
@@ -431,6 +464,7 @@
     return false;
   }
 
+  @Override
   public boolean isLessThan(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -451,6 +485,7 @@
     return false;
   }
 
+  @Override
   public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -471,6 +506,7 @@
     return false;
   }
 
+  @Override
   public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -491,6 +527,7 @@
     return false;
   }
 
+  @Override
   public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -511,6 +548,7 @@
     return false;
   }
 
+  @Override
   public LispObject truncate(LispObject obj) throws ConditionThrowable
   {
     final LispThread thread = LispThread.currentThread();
@@ -572,6 +610,7 @@
     return thread.setValues(value1, value2);
   }
 
+  @Override
   public LispObject ash(LispObject obj) throws ConditionThrowable
   {
     BigInteger n = value;
@@ -598,11 +637,13 @@
     return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGNOT()
   {
     return number(value.not());
   }
 
+  @Override
   public LispObject LOGAND(int n) throws ConditionThrowable
   {
     if (n >= 0)
@@ -611,6 +652,7 @@
       return number(value.and(BigInteger.valueOf(n)));
   }
 
+  @Override
   public LispObject LOGAND(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -630,11 +672,13 @@
       return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGIOR(int n) throws ConditionThrowable
   {
     return number(value.or(BigInteger.valueOf(n)));
   }
 
+  @Override
   public LispObject LOGIOR(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -651,11 +695,13 @@
       return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGXOR(int n) throws ConditionThrowable
   {
     return number(value.xor(BigInteger.valueOf(n)));
   }
 
+  @Override
   public LispObject LOGXOR(LispObject obj) throws ConditionThrowable
   {
     final BigInteger n;
@@ -668,6 +714,7 @@
     return number(value.xor(n));
   }
 
+  @Override
   public LispObject LDB(int size, int position)
   {
     BigInteger n = value.shiftRight(position);
@@ -675,11 +722,13 @@
     return number(n.and(mask));
   }
 
+  @Override
   public int hashCode()
   {
     return value.hashCode();
   }
 
+  @Override
   public String writeToString() throws ConditionThrowable
   {
     final LispThread thread = LispThread.currentThread();

Modified: trunk/abcl/src/org/armedbear/lisp/Fixnum.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Fixnum.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Fixnum.java	Sat Dec 27 00:32:26 2008
@@ -63,11 +63,13 @@
     this.value = value;
   }
 
+  @Override
   public Object javaInstance()
   {
     return Integer.valueOf(value);
   }
 
+  @Override
   public Object javaInstance(Class c)
   {
     String cn = c.getName();
@@ -80,6 +82,7 @@
     return javaInstance();
   }
 
+  @Override
   public LispObject typeOf()
   {
     if (value == 0 || value == 1)
@@ -89,11 +92,13 @@
     return Symbol.FIXNUM;
   }
 
+  @Override
   public LispObject classOf()
   {
     return BuiltInClass.FIXNUM;
   }
 
+  @Override
   public LispObject getDescription()
   {
     StringBuffer sb = new StringBuffer("The fixnum ");
@@ -101,6 +106,7 @@
     return new SimpleString(sb);
   }
 
+  @Override
   public LispObject typep(LispObject type) throws ConditionThrowable
   {
     if (type instanceof Symbol)
@@ -147,41 +153,49 @@
     return super.typep(type);
   }
 
+  @Override
   public LispObject NUMBERP()
   {
     return T;
   }
 
+  @Override
   public boolean numberp()
   {
     return true;
   }
 
+  @Override
   public LispObject INTEGERP()
   {
     return T;
   }
 
+  @Override
   public boolean integerp()
   {
     return true;
   }
 
+  @Override
   public boolean rationalp()
   {
     return true;
   }
 
+  @Override
   public boolean realp()
   {
     return true;
   }
 
+  @Override
   public boolean eql(int n)
   {
     return value == n;
   }
 
+  @Override
   public boolean eql(LispObject obj)
   {
     if (this == obj)
@@ -194,11 +208,13 @@
     return false;
   }
 
+  @Override
   public boolean equal(int n)
   {
     return value == n;
   }
 
+  @Override
   public boolean equal(LispObject obj)
   {
     if (this == obj)
@@ -211,11 +227,13 @@
     return false;
   }
 
+  @Override
   public boolean equalp(int n)
   {
     return value == n;
   }
 
+  @Override
   public boolean equalp(LispObject obj)
   {
     if (obj instanceof Fixnum)
@@ -227,6 +245,7 @@
     return false;
   }
 
+  @Override
   public LispObject ABS()
   {
     if (value >= 0)
@@ -236,36 +255,43 @@
     return new Bignum(-((long)Integer.MIN_VALUE));
   }
 
+  @Override
   public LispObject NUMERATOR()
   {
     return this;
   }
 
+  @Override
   public LispObject DENOMINATOR()
   {
     return ONE;
   }
 
+  @Override
   public boolean evenp() throws ConditionThrowable
   {
     return (value & 0x01) == 0;
   }
 
+  @Override
   public boolean oddp() throws ConditionThrowable
   {
     return (value & 0x01) != 0;
   }
 
+  @Override
   public boolean plusp()
   {
     return value > 0;
   }
 
+  @Override
   public boolean minusp()
   {
     return value < 0;
   }
 
+  @Override
   public boolean zerop()
   {
     return value == 0;
@@ -313,11 +339,13 @@
       }
   }
 
+  @Override
   public int intValue()
   {
     return value;
   }
 
+  @Override
   public long longValue()
   {
     return (long) value;
@@ -328,6 +356,7 @@
     return BigInteger.valueOf(value);
   }
 
+  @Override
   public final LispObject incr()
   {
     if (value < Integer.MAX_VALUE)
@@ -335,6 +364,7 @@
     return new Bignum((long) value + 1);
   }
 
+  @Override
   public final LispObject decr()
   {
     if (value > Integer.MIN_VALUE)
@@ -342,6 +372,7 @@
     return new Bignum((long) value - 1);
   }
 
+  @Override
   public LispObject negate()
   {
     long result = 0L - value;
@@ -351,6 +382,7 @@
       return new Bignum(result);
   }
 
+  @Override
   public LispObject add(int n)
   {
     long result = (long) value + n;
@@ -360,6 +392,7 @@
       return new Bignum(result);
   }
 
+  @Override
   public LispObject add(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -391,6 +424,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject subtract(int n)
   {
     long result = (long) value - n;
@@ -400,6 +434,7 @@
       return new Bignum(result);
   }
 
+  @Override
   public LispObject subtract(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -427,6 +462,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject multiplyBy(int n)
   {
     long result = (long) value * n;
@@ -436,6 +472,7 @@
       return new Bignum(result);
   }
 
+  @Override
   public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -469,6 +506,7 @@
     return type_error(obj, Symbol.NUMBER);
   }
 
+  @Override
   public LispObject divideBy(LispObject obj) throws ConditionThrowable
   {
     try
@@ -516,11 +554,13 @@
       }
   }
 
+  @Override
   public boolean isEqualTo(int n)
   {
     return value == n;
   }
 
+  @Override
   public boolean isEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -538,11 +578,13 @@
     return false;
   }
 
+  @Override
   public boolean isNotEqualTo(int n)
   {
     return value != n;
   }
 
+  @Override
   public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -561,11 +603,13 @@
     return false;
   }
 
+  @Override
   public boolean isLessThan(int n)
   {
     return value < n;
   }
 
+  @Override
   public boolean isLessThan(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -586,11 +630,13 @@
     return false;
   }
 
+  @Override
   public boolean isGreaterThan(int n) throws ConditionThrowable
   {
     return value > n;
   }
 
+  @Override
   public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -611,11 +657,13 @@
     return false;
   }
 
+  @Override
   public boolean isLessThanOrEqualTo(int n)
   {
     return value <= n;
   }
 
+  @Override
   public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -636,11 +684,13 @@
     return false;
   }
 
+  @Override
   public boolean isGreaterThanOrEqualTo(int n)
   {
     return value >= n;
   }
 
+  @Override
   public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -661,6 +711,7 @@
     return false;
   }
 
+  @Override
   public LispObject truncate(LispObject obj) throws ConditionThrowable
   {
     final LispThread thread = LispThread.currentThread();
@@ -722,6 +773,7 @@
     return thread.setValues(value1, value2);
   }
 
+  @Override
   public LispObject MOD(LispObject divisor) throws ConditionThrowable
   {
     if (divisor instanceof Fixnum)
@@ -729,6 +781,7 @@
     return super.MOD(divisor);
   }
 
+  @Override
   public LispObject MOD(int divisor) throws ConditionThrowable
   {
     final int r;
@@ -755,6 +808,7 @@
     return new Fixnum(r);
   }
 
+  @Override
   public LispObject ash(int shift)
   {
     if (value == 0)
@@ -784,6 +838,7 @@
     return number(BigInteger.valueOf(value).shiftLeft(shift));
   }
 
+  @Override
   public LispObject ash(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -803,16 +858,19 @@
     return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGNOT()
   {
     return new Fixnum(~value);
   }
 
+  @Override
   public LispObject LOGAND(int n) throws ConditionThrowable
   {
     return new Fixnum(value & n);
   }
 
+  @Override
   public LispObject LOGAND(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -834,11 +892,13 @@
     return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGIOR(int n) throws ConditionThrowable
   {
     return new Fixnum(value | n);
   }
 
+  @Override
   public LispObject LOGIOR(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -852,11 +912,13 @@
     return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LOGXOR(int n) throws ConditionThrowable
   {
     return new Fixnum(value ^ n);
   }
 
+  @Override
   public LispObject LOGXOR(LispObject obj) throws ConditionThrowable
   {
     if (obj instanceof Fixnum)
@@ -870,6 +932,7 @@
     return type_error(obj, Symbol.INTEGER);
   }
 
+  @Override
   public LispObject LDB(int size, int position)
   {
     long n = (long) value >> position;
@@ -915,11 +978,13 @@
     return new Bignum(xy);
   }
 
+  @Override
   public int hashCode()
   {
     return value;
   }
 
+  @Override
   public String writeToString() throws ConditionThrowable
   {
     final LispThread thread = LispThread.currentThread();




More information about the armedbear-cvs mailing list