@Nonnull public static JSAtomInt lit (final int nValue) { return nValue >= 0 && nValue < MAX_ATOM_INT_CACHE ? INT_CACHE[nValue] : new JSAtomInt (nValue); }
@Override @Nonnull public AbstractJSAtomNumeric numericMinus () { return new JSAtomInt (-m_nValue); }
@Override @Nonnull public AbstractJSAtomNumeric numericIncr () { return new JSAtomInt (m_nValue + 1); }
@Override @Nonnull public AbstractJSAtomNumeric numericDecr () { return new JSAtomInt (m_nValue - 1); }
@Nonnull public static JSAtomInt lit (final long nValue) { return nValue >= 0 && nValue < MAX_ATOM_INT_CACHE ? INT_CACHE[(int) nValue] : new JSAtomInt (nValue); }
@Override @Nonnull public AbstractJSAtomNumeric numericDecr () { return new JSAtomInt (m_nValue - 1); }
@Override @Nonnull public AbstractJSAtomNumeric numericIncr () { return new JSAtomInt (m_nValue + 1); }
@Nonnull public static JSAtomInt lit (final int nValue) { return nValue >= 0 && nValue < MAX_ATOM_INT_CACHE ? INT_CACHE[nValue] : new JSAtomInt (nValue); }
@Nonnull public static JSAtomInt lit (final long nValue) { return nValue >= 0 && nValue < MAX_ATOM_INT_CACHE ? INT_CACHE[(int) nValue] : new JSAtomInt (nValue); }
@Override @Nonnull public AbstractJSAtomNumeric numericMinus () { return new JSAtomInt (-m_nValue); }
@Override @Nonnull public AbstractJSAtomNumeric numericMod (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue % aRhs.doubleValue ()); return new JSAtomInt (m_nValue % (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericPlus (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue + aRhs.doubleValue ()); return new JSAtomInt (m_nValue + (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericMinus (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue - aRhs.doubleValue ()); return new JSAtomInt (m_nValue - (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericMul (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue * aRhs.doubleValue ()); return new JSAtomInt (m_nValue * (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericMul (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue * aRhs.doubleValue ()); return new JSAtomInt (m_nValue * (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericPlus (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue + aRhs.doubleValue ()); return new JSAtomInt (m_nValue + (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericMod (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue % aRhs.doubleValue ()); return new JSAtomInt (m_nValue % (long) aRhs.doubleValue ()); }
@Override @Nonnull public AbstractJSAtomNumeric numericMinus (@Nonnull final AbstractJSAtomNumeric aRhs) { if (aRhs.isDecimalValue ()) return new JSAtomDecimal (m_nValue - aRhs.doubleValue ()); return new JSAtomInt (m_nValue - (long) aRhs.doubleValue ()); }