Get a new object with the same unit but a subtracted value.

@param aDelta
The delta to be subtracted. May not be <code>null</code>.
@return A new object. Never <code>null</code>.
@since 3.7.3
972561
@Nonnull
  @CheckReturnValue
  public CSSSimpleValueWithUnit substract (@Nonnull final BigDecimal aDelta)
  {
    return new CSSSimpleValueWithUnit (m_aValue.subtract (aDelta), m_eUnit);
  }
583905
def _subtract_timedelta(self, delta):
        
        if isinstance(delta, pendulum.Duration):
            return self.subtract(
                years=delta.years,
                months=delta.months,
                weeks=delta.weeks,
                days=delta.remaining_days,
            )

        return self.subtract(days=delta.days)
664354
public boolean objectsEqual(T other) throws SQLException {
		checkForDao();
		@SuppressWarnings("unchecked")
		T t = (T) this;
		return dao.objectsEqual(t, other);
	}
1148769
def delta(self, fromdate, todate):
        '''
        
        '''
#CONSIDER: raise an exception if a date is not in self
        return self.index(todate) - self.index(fromdate)
1126385
public static DoubleBinding scalb(final ObservableDoubleValue d, final ObservableIntegerValue scaleFactor) {
        return createDoubleBinding(()->Math.scalb(d.get(), scaleFactor.get()), d, scaleFactor);
    }
18710
def get_delta(value):
    
    if isinstance(value, (int, float)):
        return timedelta(seconds=value)
    elif isinstance(value, timedelta):
        return value
    raise Exception('Invalid delta')
281312
def subtract_timedelta(self, delta):
        
        if delta.days:
            raise TypeError("Cannot subtract timedelta with days to Time.")

        return self.subtract(seconds=delta.seconds, microseconds=delta.microseconds)
16271
static Map<String, Object> sumOfDelta(Map<String, Object> state, Map<String, Object> delta) {
        InstanceKey instanceId = (InstanceKey) delta.get("InstanceKey");
        if (instanceId == null) {
            throw new RuntimeException("InstanceKey can not be null");
        }
        for (String key : delta.keySet()) {
            Object existing = state.get(key);
            Object current = delta.get(key);
            if (current instanceof Number) {
                if (existing == null) {
                    existing = 0;
                }
                Number v = (Number) existing;
                Number d = (Number) delta.get(key);
                state.put(key, v.longValue() + d.longValue());
            } else if (current instanceof NumberList) {
                if (existing == null) {
                    state.put(key, current);
                } else {
                    state.put(key, ((NumberList) existing).sum((NumberList) current));
                }
            } else {
                Object o = delta.get(key);
                if (o instanceof String[]) {
                    String[] vs = (String[]) o;
                    if (vs.length == 1) {
                        Object previousAggregateString = state.get(key);
                        if (previousAggregateString instanceof AggregateString) {
                            state.put(key, ((AggregateString) previousAggregateString).update(null, vs[0], instanceId));
                        } else {
                            state.put(key, AggregateString.create(vs[0], instanceId));
                        }
                    } else {
                        // it should always be AggregateString here since that's all we add above
                        AggregateString pas = (AggregateString) state.get(key);
                        state.put(key, pas.update(vs[0], vs[1], instanceId));
                    }
                } else {
                    state.put(key, String.valueOf(o));
                }

            }
        }
        return state;
    }
1355445
def duplicate(self):
        '''
        
        '''
        return self.__class__(amount=self.amount, date=self.date,
                              method=self.method, ref=self.ref)
350414
private Deque<MutablePair<DeltaType, Object>> combineDeltas(
      LinkedList<MutablePair<DeltaType, Object>> deltas) {
    if (deltas.size() < 2) {
      return deltas;
    }
    int size = deltas.size();
    MutablePair<DeltaType, Object> d1 = deltas.peekLast();
    MutablePair<DeltaType, Object> d2 = deltas.get(size - 2);
    MutablePair<DeltaType, Object> out = isDuplicate(d1, d2);
    if (out != null) {
      Deque<MutablePair<DeltaType, Object>> newDeltas = new LinkedList<>();
      newDeltas.addAll(deltas.subList(0, size - 2));
      newDeltas.add(out);
      return newDeltas;
    }
    return deltas;
  }
1055229
public static Equ getInstance(final boolean fresh)
    {
        if (instance == null || fresh)
        {
            final Equ newInstance = new Equ();
            try
            {
                newInstance.initialize();
            } catch (final Exception e)
            {
                e.printStackTrace();
            }
            instance = newInstance;
        }
        return instance;
    }
778823
public void setDelta(double delta)
    {
        if(delta <= 0 || delta >= 1 || Double.isNaN(delta))
            throw new IllegalArgumentException("delta must be in (0,1), not " + delta);
        this.delta = delta;
    }
191158
public static Value convertFromJava(Object o) {
        if (o instanceof Long) {
            return new NumberValue(new BigDecimal((Long) o));
        } else if (o instanceof Integer) {
            return new NumberValue(new BigDecimal((Integer) o));
        } else if (o instanceof Double) {
            return new NumberValue(new BigDecimal((Double) o));
        } else if (o instanceof Float) {
            return new NumberValue(new BigDecimal((Float) o));
        } else if (o instanceof String) {
            return new StringValue((String) o);
        } else if (o instanceof Date) {
            return new DateValue((Date) o);
        } else if (o instanceof Boolean) {
            return BooleanValue.getInstance((Boolean) o);
        } else if (o == null) {
            return NilValue.getInstance();
        }
        throw new CommandExecutionException("Could not convert Java object " + o + " to an equivalent srec value");
    }
752638
public static MonetaryAmountDecimalFormatBuilder newInstance() {
        MonetaryAmountDecimalFormatBuilder builder = new MonetaryAmountDecimalFormatBuilder();
        builder.decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance();
        return builder;
    }
391905
public ValueObject getValueObject(final int i) throws NoSuchColumnException {
        if (i < 0 || i > resultSet.get(rowPointer).size()) {
            throw new NoSuchColumnException("No such column: " + i);
        }
        return resultSet.get(rowPointer).get(i);
    }
1296261
@Override
    public Money subtract(MonetaryAmount subtrahend) {
        MoneyUtils.checkAmountParameter(subtrahend, this.currency);
        if (subtrahend.isZero()) {
            return this;
        }
        return new Money(this.number.subtract(subtrahend.getNumber().numberValue(BigDecimal.class)), getCurrency());
    }
1234254
@SuppressWarnings({ "rawtypes", "unchecked" })
	private Object adjustablePartsCloned(Object original) {
		if (original instanceof NamedList) {
			NamedList<Object> newObject = new SimpleOrderedMap();
			NamedList<Object> originalObject = (NamedList<Object>) original;
			for (int i = 0; i < originalObject.size(); i++) {
				newObject.add(originalObject.getName(i), adjustablePartsCloned(originalObject.getVal(i)));
			}
			return newObject;
		} else if (original instanceof ArrayList) {
			ArrayList<Object> newObject = new ArrayList<>();
			ArrayList<Object> originalObject = (ArrayList<Object>) original;
			for (int i = 0; i < originalObject.size(); i++) {
				newObject.add(adjustablePartsCloned(originalObject.get(i)));
			}
			return newObject;
		} else if (original instanceof Integer) {
			return original;
		}
		return original;
	}