/** * Equivalent to {@link #sum}. * * @return the sum */ @Override public long longValue() { return sum(); }
/** * Returns the {@link #sum} as an {@code int} after a narrowing * primitive conversion. */ @Override public int intValue() { return (int) sum(); }
/** * Returns the {@link #sum} as a {@code double} after a widening * primitive conversion. */ @Override public double doubleValue() { return (double) sum(); }
/** * Returns the {@link #sum} as a {@code float} * after a widening primitive conversion. */ @Override public float floatValue() { return (float) sum(); }
/** * Returns the String representation of the {@link #sum}. * * @return the String representation of the {@link #sum} */ public String toString() { return Long.toString(sum()); }