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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getError()final inthashCode()Returns a hash code value for this object.boolean<R> ChunkResult<R> orElseThrow(Supplier<E> p_332180_) final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
value
The field for thevaluerecord component.
-
-
Constructor Details
-
Success
Creates an instance of aSuccessrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess()- Specified by:
isSuccessin interfaceChunkResult<T>
-
orElse
- Specified by:
orElsein interfaceChunkResult<T>
-
getError
- Specified by:
getErrorin interfaceChunkResult<T>
-
ifSuccess
- Specified by:
ifSuccessin interfaceChunkResult<T>
-
map
- Specified by:
mapin interfaceChunkResult<T>
-
orElseThrow
- Specified by:
orElseThrowin 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 thevaluerecord component.- Returns:
- the value of the
valuerecord component
-