Objects Class

Definition

This class consists of static utility methods for operating on objects, or checking certain conditions before operation.

[Android.Runtime.Register("java/util/Objects", DoNotGenerateAcw=true)]
public sealed class Objects : Java.Lang.Object
[<Android.Runtime.Register("java/util/Objects", DoNotGenerateAcw=true)>]
type Objects = class
    inherit Object
Inheritance
Objects
Attributes

Remarks

This class consists of static utility methods for operating on objects, or checking certain conditions before operation. These utilities include null-safe or null-tolerant methods for computing the hash code of an object, returning a string for an object, comparing two objects, and checking if indexes or sub-range values are out of bounds.

Added in 1.7.

Java documentation for java.util.Objects.

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.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

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

(Inherited from Object)
ThresholdType

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

(Inherited from Object)

Methods

CheckFromIndexSize(Int32, Int32, Int32)

Checks if the sub-range from fromIndex (inclusive) to fromIndex + size (exclusive) is within the bounds of range from 0 (inclusive) to length (exclusive).

CheckFromIndexSize(Int64, Int64, Int64)

Checks if the sub-range from fromIndex (inclusive) to fromIndex + size (exclusive) is within the bounds of range from 0 (inclusive) to length (exclusive).

CheckFromToIndex(Int32, Int32, Int32)

Checks if the sub-range from fromIndex (inclusive) to toIndex (exclusive) is within the bounds of range from 0 (inclusive) to length (exclusive).

CheckFromToIndex(Int64, Int64, Int64)

Checks if the sub-range from fromIndex (inclusive) to toIndex (exclusive) is within the bounds of range from 0 (inclusive) to length (exclusive).

CheckIndex(Int32, Int32)

Checks if the index is within the bounds of the range from 0 (inclusive) to length (exclusive).

CheckIndex(Int64, Int64)

Checks if the index is within the bounds of the range from 0 (inclusive) to length (exclusive).

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Compare(Object, Object, IComparator)

Returns 0 if the arguments are identical and c.compare(a, b) otherwise.

DeepEquals(Object, Object)

Returns true if the arguments are deeply equal to each other and false otherwise.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object, Object)

Returns true if the arguments are equal to each other and false otherwise.

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
Hash(Object[])

Generates a hash code for a sequence of input values.

HashCode(Object)

Returns the hash code of a non-null argument and 0 for a null argument.

IsNull(Object)

Returns true if the provided reference is null otherwise returns false.

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)
NonNull(Object)

Returns true if the provided reference is non-null otherwise returns false.

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)
RequireNonNull(Object, ISupplier)

Checks that the specified object reference is not null and throws a customized NullPointerException if it is.

RequireNonNull(Object, String)

Checks that the specified object reference is not null and throws a customized NullPointerException if it is.

RequireNonNull(Object)

Checks that the specified object reference is not null.

RequireNonNullElse(Object, Object)

Returns the first argument if it is non-null and otherwise returns the non-null second argument.

RequireNonNullElseGet(Object, ISupplier)

Returns the first argument if it is non-null and otherwise returns the non-null value of supplier.get().

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

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

Returns a string representation of the object.

(Inherited from Object)
ToString(Object, String)

Returns the result of calling toString on the first argument if the first argument is not null and returns the second argument otherwise.

ToString(Object)

Returns the result of calling toString for a non-null argument and "null" for a null argument.

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

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