Module aeonics.core
Package aeonics.util

Class Callback.Once<U,​S>

  • Type Parameters:
    U - the type of data that triggered this callback
    S - the type of the target class of this callback
    All Implemented Interfaces:
    Functions.BiConsumer<U,​S>, Functions.Consumer<U>
    Enclosing class:
    Callback<V,​T>

    public static class Callback.Once<U,​S>
    extends java.lang.Object
    implements Functions.BiConsumer<U,​S>
    This class specified that a callback handler should only run once and then be removed from the list of handlers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(U value, S target)
      Performs this operation on the given arguments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • accept

        public void accept​(U value,
                           S target)
                    throws java.lang.Exception
        Description copied from interface: Functions.BiConsumer
        Performs this operation on the given arguments.
        Specified by:
        accept in interface Functions.BiConsumer<U,​S>
        Parameters:
        value - the input argument
        target - the input argument
        Throws:
        java.lang.Exception - if an error happens