package ceylon;

public final class Integer
{
    private final long value;
    private Integer(long l) {
        value = l;
    }

    public static ceylon.Integer instance(long l) {
        return new ceylon.Integer(l);
    }

    public ceylon.Integer plus(ceylon.Integer op) {
        return instance(value + op.value);
    }

    public ceylon.Integer minus(ceylon.Integer op) {
        return instance(value - op.value);
    }

    public ceylon.Integer times(ceylon.Integer op) {
        return instance(value * op.value);
    }

    public ceylon.Integer divided(ceylon.Integer op) {
        return instance(value / op.value);
    }

    public ceylon.Integer remainder(ceylon.Integer op) {
        return instance(value % op.value);
    }

    public ceylon.Integer power(ceylon.Integer op) {
        return instance((long) Math.pow(value, op.value)); // FIXME: ugly
    }

    public ceylon.Integer and(ceylon.Integer op) {
        return instance(value & op.value);
    }

    public ceylon.Integer or(ceylon.Integer op) {
        return instance(value | op.value);
    }

    public ceylon.Integer xor(ceylon.Integer op) {
        return instance(value ^ op.value);
    }

    public ceylon.String asString() {
        return ceylon.String.instance(java.lang.Long.toString(value));
    }
}

@@ -252,12 +252,19 @@
 ger 
-plus
+operatorAdd
 (cey
@@ -361,13 +361,24 @@
 ger 
-minus
+operatorSubtract
 (cey
@@ -475,13 +475,24 @@
 ger 
-times
+operatorMultiply
 (cey
@@ -589,15 +589,21 @@
 ger 
-divided
+operatorPower
 (cey
@@ -648,15 +648,30 @@
 nce(
+(long) Math.pow(
 value
- /
+,
  op.
@@ -668,33 +668,49 @@
 value, op.value)
-;
+); // FIXME: ugly
 %0A    %7D%0A%0A    publ
@@ -731,17 +731,22 @@
 ger 
-remain
+operatorDivi
 de
-r
 (cey
@@ -797,9 +797,9 @@
 lue 
-%25
+/
  op.
@@ -843,13 +843,22 @@
 ger 
-power
+operatorModulo
 (cey
@@ -899,38 +899,23 @@
 nstance(
-(long) Math.pow(
 value
-,
+ %25
  op.valu
@@ -916,33 +916,17 @@
 p.value)
-)
 ;
- // FIXME: ugly
 %0A    %7D%0A%0A
@@ -951,17 +951,32 @@
 Integer 
-a
+operatorBitwiseA
 nd(ceylo
@@ -1068,16 +1068,31 @@
 nteger o
+peratorBitwiseO
 r(ceylon
@@ -1186,9 +1186,24 @@
 ger 
-x
+operatorBitwiseX
 or(c

Revert "9a1bea4716dc: Change method names to match the spec". I'd assumed the names in the spec were prescriptive, but not all operators have them so I think in fact they are just to illustrate what's happening. Either way, the specified names are inconsistent, and I think they might be English slang. They certainly don't match what other languages use.