Package cs2030s.fp
Class Actually.Success<T>
- java.lang.Object
-
- cs2030s.fp.Actually<T>
-
- cs2030s.fp.Actually.Success<T>
-
- All Implemented Interfaces:
Actionable<T>
,Immutatorable<T>
private static class Actually.Success<T> extends Actually<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
act(Action<? super T> action)
The method to act on its content.boolean
equals(java.lang.Object obj)
<U extends T>
Texcept(Constant<? extends U> c)
void
finish(Action<? super T> action)
<R> Actually<R>
next(Immutator<? extends Actually<? extends R>,? super T> immutator)
java.lang.String
toString()
<R> Actually<R>
transform(Immutator<? extends R,? super T> immutator)
The method to produce another container with immutated element.<U extends T>
Tunless(U other)
T
unwrap()
-
-
-
Field Detail
-
value
private final T value
-
-
Constructor Detail
-
Success
private Success(T value)
-
-
Method Detail
-
transform
public <R> Actually<R> transform(Immutator<? extends R,? super T> immutator)
Description copied from interface:Immutatorable
The method to produce another container with immutated element.- Type Parameters:
R
- the return type- Parameters:
immutator
- The immutator.- Returns:
- A new container containing the immutated element.
-
act
public void act(Action<? super T> action)
Description copied from interface:Actionable
The method to act on its content.- Parameters:
action
- The action.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-