MemorySegmentPREVIEW
public static sealed interface MemorySegment.Scope
Scope
is a preview API of the Java platform. Scope instances can be compared for equality. That is, two scopes are considered equals(Object) if they denote the same lifetime.
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Returns true , if the provided object is also a scope, which models the same lifetime as that modelled by this scope. |
int |
hashCode() |
Returns the hash code of this scope object. |
boolean |
isAlive() |
Returns true , if the regions of memory backing the memory segments associated with this scope are still valid. |
boolean isAlive()
true
, if the regions of memory backing the memory segments associated with this scope are still valid.true
, if the regions of memory backing the memory segments associated with this scope are still validboolean equals(Object that)
true
, if the provided object is also a scope, which models the same lifetime as that modelled by this scope.. In that case, it is always the case that this.isAlive() == ((Scope)that).isAlive()
.int hashCode()
hashCode
in class Object
Object.hashCode()
.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/foreign/MemorySegment.Scope.html
Scope
when preview features are enabled.