Package net.minecraft.server.level
Record Class ChunkResult.Success<T>
java.lang.Object
java.lang.Record
net.minecraft.server.level.ChunkResult.Success<T>
- All Implemented Interfaces:
ChunkResult<T>
- Enclosing interface:
ChunkResult<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.level.ChunkResult
ChunkResult.Fail<T>, ChunkResult.Success<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getError()
final int
hashCode()
Returns a hash code value for this object.boolean
<R> ChunkResult
<R> orElseThrow
(Supplier<E> p_335933_) final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Field Details
-
value
The field for thevalue
record component.
-
-
Constructor Details
-
Success
Creates an instance of aSuccess
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
isSuccess
public boolean isSuccess()- Specified by:
isSuccess
in interfaceChunkResult<T>
-
orElse
- Specified by:
orElse
in interfaceChunkResult<T>
-
getError
- Specified by:
getError
in interfaceChunkResult<T>
-
ifSuccess
- Specified by:
ifSuccess
in interfaceChunkResult<T>
-
map
- Specified by:
map
in interfaceChunkResult<T>
-
orElseThrow
- Specified by:
orElseThrow
in interfaceChunkResult<T>
- Throws:
E
-
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)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-