Package dev.turboism.sdk.hostread
Record Class ProjectWorkspaceSnapshot
java.lang.Object
java.lang.Record
dev.turboism.sdk.hostread.ProjectWorkspaceSnapshot
- Record Components:
project- the open project's snapshot, empty when the host reported no projectworkspace- the workspace snapshot, empty when the host reported no workspace
- All Implemented Interfaces:
AsyncHostReadValue
public record ProjectWorkspaceSnapshot(Optional<ProjectSnapshot> project, Optional<WorkspaceSnapshot> workspace)
extends Record
implements AsyncHostReadValue
The value delivered by a
AsyncHostReadIntent.PROJECT_WORKSPACE_SNAPSHOT read: a
point-in-time view of the host's open project and workspace.
Both components are optional and independently so — the host may have a workspace open with
no project, or expose neither. An empty component means the host did not report that state at
the moment of the read, not that the read failed; failures are reported through
AsyncHostReadResult instead.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectWorkspaceSnapshot(Optional<ProjectSnapshot> project, Optional<WorkspaceSnapshot> workspace) Creates an instance of aProjectWorkspaceSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.project()Returns the value of theprojectrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkspacerecord component.
-
Constructor Details
-
ProjectWorkspaceSnapshot
public ProjectWorkspaceSnapshot(Optional<ProjectSnapshot> project, Optional<WorkspaceSnapshot> workspace) Creates an instance of aProjectWorkspaceSnapshotrecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
project
Returns the value of theprojectrecord component.- Returns:
- the value of the
projectrecord component
-
workspace
Returns the value of theworkspacerecord component.- Returns:
- the value of the
workspacerecord component
-