copy/pasta from LongOp. I agree it's weird, though. I'll add it in
subtract, for chuckles.


On Mon, Mar 18, 2013 at 2:50 PM, Cory Kolbeck <notifications@github.com>wrote:

> In src/main/java/com/urbanairship/datacube/ops/DoubleOp.java:
>
> > +
> > +    public DoubleOp(double val) {
> > +        this.val = val;
> > +    }
> > +
> > +    @Override
> > +    public Op add(Op otherOp) {
> > +        if(!(otherOp instanceof DoubleOp)) {
> > +            throw new RuntimeException();
> > +        }
> > +        return new DoubleOp(val + ((DoubleOp)otherOp).val);
> > +    }
> > +
> > +    @Override
> > +    public Op subtract(Op otherOp) {
> > +        return new DoubleOp(this.val - ((DoubleOp)otherOp).val);
>
> Any reason for doing the instanceof check in add but not subtract?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/urbanairship/datacube/pull/43/files#r3421664>
> .
>