|
@@ -31,6 +31,13 @@ public class LispElement<E> {
|
|
|
cache.put(val, this);
|
|
|
}
|
|
|
|
|
|
+ public BigInteger getInt() {
|
|
|
+ if(this.value.getClass() == BigInteger.class) {
|
|
|
+ return (BigInteger) this.value;
|
|
|
+ }
|
|
|
+ throw new IllegalStateException("Value is not an integer");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Retourne la valeur d'un element sous forme de nombre
|
|
|
*
|