共用方式為


Rational Class

Definition

An immutable data type representation a rational number.

[Android.Runtime.Register("android/util/Rational", DoNotGenerateAcw=true)]
public sealed class Rational : Java.Lang.Number, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("android/util/Rational", DoNotGenerateAcw=true)>]
type Rational = class
    inherit Number
    interface IComparable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Rational
Attributes
Implements

Remarks

An immutable data type representation a rational number.

Contains a pair of ints representing the numerator and denominator of a Rational number.

Java documentation for android.util.Rational.

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.

Constructors

Rational(Int32, Int32)

Create a Rational with a given numerator and denominator.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Denominator

Gets the denominator of the rational

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsFinite

Indicates whether this rational represents a finite value.

IsInfinite

Indicates whether this rational represents an infinite value.

IsNaN

Indicates whether this rational is a <em>Not-a-Number (NaN)</em> value.

IsZero

Indicates whether this rational represents a zero value.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
NaN

Constant for the <em>Not-a-Number (NaN)</em> value of the Rational type.

NegativeInfinity

Constant for the negative infinity value of the Rational type.

Numerator

Gets the numerator of the rational.

PeerReference (Inherited from Object)
PositiveInfinity

Constant for the positive infinity value of the Rational type.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Number)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Number)
Zero

Constant for the zero value of the Rational type.

Methods

ByteValue()

Returns the value of the specified number as a byte.

(Inherited from Number)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(Rational)

Compare this rational to the specified rational to determine their natural order.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
DoubleValue()

Returns the value of the specified number as a double.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
FloatValue()

Returns the value of the specified number as a float.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
IntValue()

Returns the value of the specified number as a int.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
LongValue()

Returns the value of the specified number as a long.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ParseRational(String)

Parses the specified string as a rational value.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ShortValue()

Returns the value of the specified number as a short.

(Inherited from Number)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to