Record Class Trampoline.Done<T>
java.lang.Object
java.lang.Record
cloud.opencode.base.functional.monad.Trampoline.Done<T>
- Type Parameters:
T- result type - 结果类型- Record Components:
result- the computed result - 计算结果
- All Implemented Interfaces:
Trampoline<T>
- Enclosing interface:
Trampoline<T>
Completed Trampoline with a result.
包含结果的已完成 Trampoline。
- Since:
- JDK 25, opencode-base-functional V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface Trampoline
Trampoline.Done<T>, Trampoline.FlatMap<A,B>, Trampoline.More<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<U> Trampoline<U> flatMap(Function<? super T, Trampoline<U>> f) Chain another Trampoline computation.final inthashCode()Returns a hash code value for this object.booleanisDone()Check if the Trampoline is complete.result()Returns the value of theresultrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Done
-
-
Method Details
-
isDone
public boolean isDone()Description copied from interface:TrampolineCheck if the Trampoline is complete. 检查 Trampoline 是否完成。- Specified by:
isDonein interfaceTrampoline<T>- Returns:
- true if done - 如果完成返回 true
-
flatMap
Description copied from interface:TrampolineChain another Trampoline computation. 链接另一个 Trampoline 计算。Enables composition of multiple trampolined computations.
启用多个蹦床计算的组合。
- Specified by:
flatMapin interfaceTrampoline<T>- Type Parameters:
U- result type - 结果类型- Parameters:
f- function producing the next Trampoline - 产生下一个 Trampoline 的函数- Returns:
- chained Trampoline
-
toString
-
hashCode
-
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). -
result
-