100101102103104105106
((Number)o).doubleValue(): ((Size)o).getValue(); return v1 > v2 ? 1: v1 == v2 ? 0: -1; } if (o == null) return 1; throw new ZussException("Unable to compare "+this+" with "+o); }
46474849505152
} /** Return a size that negates this size. */ public Size negate() { throw new ZussException("Unable to negate a size, "+this); }
55565758596061
public Size add(Object o) { if (o instanceof Number) return new Size(size + ((Number)o).doubleValue(), measure); if (o instanceof Size) return new Size(size + ((Size)o).size, measure); throw new ZussException("Unable to add "+this+" with "+o); }
64656667686970
public Size subtract(Object o) { if (o instanceof Number) return new Size(size - ((Number)o).doubleValue(), measure); if (o instanceof Size) return new Size(size - ((Size)o).size, measure); throw new ZussException("Unable to subtract "+this+" with "+o); }
73747576777879
public Size multiply(Object o) { if (o instanceof Number) return new Size(round(size * ((Number)o).doubleValue()), measure); if (o instanceof Size) return new Size(round(size * ((Size)o).size), measure); throw new ZussException("Unable to multiply "+this+" with "+o); }
82838485868788
public Size divide(Object o) { if (o instanceof Number) return new Size(round(size / ((Number)o).doubleValue()), measure); if (o instanceof Size) return new Size(round(size / ((Size)o).size), measure); throw new ZussException("Unable to divide "+this+" with "+o); }
57585960616263
_parent = parent; } @Override public void appendChild(NodeInfo child) { throw new ZussException(this+" does not allow any children"); }
58596061626364
} } } private ZussException error(String msg, NodeInfo node) { return new ZussException(msg, _zuss.getFilename(), node.getLine()); }
61626364656667
private ZussException error(String msg, NodeInfo node) { return new ZussException(msg, _zuss.getFilename(), node.getLine()); } private ZussException error(String msg, int lineno) { return new ZussException(msg, _zuss.getFilename(), lineno); }