Package akka.util

Class Helpers.Requiring<A>

  • Enclosing class:
    Helpers

    public static final class Helpers.Requiring<A>
    extends scala.AnyVal
    Check that a condition is true. If true, return value, otherwise throw an IllegalArgumentException with the given message.

    param: cond The condition to check. param: msg The message to report if the condition isn't met.

    • Constructor Summary

      Constructors 
      Constructor Description
      Requiring​(A value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object x$1)  
      int hashCode()  
      A requiring​(boolean cond, scala.Function0<java.lang.Object> msg)  
      A requiring​(scala.Function1<A,​java.lang.Object> cond, scala.Function0<java.lang.Object> msg)
      Check that a condition is true for the value.
      A value()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Requiring

        public Requiring​(A value)
    • Method Detail

      • value

        public A value()
      • requiring

        public A requiring​(boolean cond,
                           scala.Function0<java.lang.Object> msg)
      • requiring

        public A requiring​(scala.Function1<A,​java.lang.Object> cond,
                           scala.Function0<java.lang.Object> msg)
        Check that a condition is true for the value. If true, return value, otherwise throw an IllegalArgumentException with the given message.

        Parameters:
        cond - The function used to check the value.
        msg - The message to report if the condition isn't met.
        Returns:
        (undocumented)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Overrides:
        equals in class java.lang.Object