edu.wpi.first.wpilibj

## Class InterruptHandlerFunction<T>

- java.lang.Object
- - edu.wpi.first.wpilibj.InterruptHandlerFunction<T>

- Type Parameters:
    `T` - The type of the parameter that should be returned to the the method `interruptFired(int, Object)`

      public abstract class InterruptHandlerFunction<T>
      extends java.lang.Object

  It is recommended that you use this class in conjunction with classes from `java.util.concurrent.atomic` as these objects are all thread safe.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InterruptHandlerFunction()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `interruptFired(int interruptAssertedMask, T param)` This method is run every time an interrupt is fired.
    `T` | `overridableParameter()` Override this method if you would like to pass a specific parameter to the `interruptFired(int, Object)` when it is fired by the interrupt.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InterruptHandlerFunction

          public InterruptHandlerFunction()

  - ### Method Detail

    - #### interruptFired

          public abstract void interruptFired(int interruptAssertedMask,
                                              T param)

      This method is run every time an interrupt is fired.
      Parameters:
        `interruptAssertedMask` - Interrupt Mask
        `param` - The parameter provided by overriding the `overridableParameter()` method.

    - #### overridableParameter

          public T overridableParameter()

      Override this method if you would like to pass a specific parameter to the `interruptFired(int, Object)` when it is fired by the interrupt. This method is called once when `InterruptableSensorBase.requestInterrupts(InterruptHandlerFunction)` is run.
      Returns:
        The object that should be passed to the interrupt when it runs