Package org.eolang

Class Expect<T>

  • Type Parameters:
    T - Type of returned value

    public final class Expect<T>
    extends Object
    This wrapper helps us explain our expectations in an error message that we throw.
    Since:
    0.41.0
    • Constructor Detail

      • Expect

        public Expect​(Action<T> act,
                      String msg)
        Ctor.
        Parameters:
        act - The action
        msg - Additional explanation
    • Method Detail

      • it

        public T it()
        Take the value from the lambda.
        Returns:
        The value