StrictMath.DecrementExact Method

Definition

Overloads

DecrementExact(Int32)

Returns the argument decremented by one, throwing an exception if the result overflows an int.

DecrementExact(Int64)

Returns the argument decremented by one, throwing an exception if the result overflows a long.

DecrementExact(Int32)

Returns the argument decremented by one, throwing an exception if the result overflows an int.

[Android.Runtime.Register("decrementExact", "(I)I", "", ApiSince=34)]
public static int DecrementExact (int a);
[<Android.Runtime.Register("decrementExact", "(I)I", "", ApiSince=34)>]
static member DecrementExact : int -> int

Parameters

a
Int32

the value to decrement

Returns

the result

Attributes

Remarks

Returns the argument decremented by one, throwing an exception if the result overflows an int. The overflow only occurs for Integer#MIN_VALUE the minimum value.

Added in 14.

Java documentation for java.lang.StrictMath.decrementExact(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

DecrementExact(Int64)

Returns the argument decremented by one, throwing an exception if the result overflows a long.

[Android.Runtime.Register("decrementExact", "(J)J", "", ApiSince=34)]
public static long DecrementExact (long a);
[<Android.Runtime.Register("decrementExact", "(J)J", "", ApiSince=34)>]
static member DecrementExact : int64 -> int64

Parameters

a
Int64

the value to decrement

Returns

the result

Attributes

Remarks

Returns the argument decremented by one, throwing an exception if the result overflows a long. The overflow only occurs for Long#MIN_VALUE the minimum value.

Added in 14.

Java documentation for java.lang.StrictMath.decrementExact(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to