org.qi4j.library.alarm

## Class AlarmHistory.AlarmHistoryMixin

- java.lang.Object
- - org.qi4j.library.alarm.AlarmHistory.AlarmHistoryMixin

- All Implemented Interfaces:
    AlarmHistory
  Enclosing interface:
    AlarmHistory

      public abstract static class AlarmHistory.AlarmHistoryMixin
      extends Object
      implements AlarmHistory

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.library.alarm.AlarmHistory

      `AlarmHistory.AlarmHistoryMixin`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AlarmHistory.AlarmHistoryMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `activateCounter()` Returns the Counter of activate triggers.
    `void` | `addEvent(AlarmEvent event, String trigger)`
    `AlarmEvent` | `eventAt(int position)` Returns the recorded `AlarmEvent` at the given position in the buffer.
    `AlarmEvent` | `eventAtEnd(int position)` Returns the recorded `AlarmEvent` at the given position in the buffer counted from the end.
    `AlarmEvent` | `firstEvent()` Returns the oldest recorded `AlarmEvent`.
    `AlarmEvent` | `lastEvent()` Returns the newest recorded `AlarmEvent`.
    `void` | `resetActivateCounter()` Resets the Activate counter.
    `void` | `resetAllCounters()` Resets all counters.
    `String` | `toString()`

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

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

    - ### Methods inherited from interface org.qi4j.library.alarm.AlarmHistory

      `allAlarmEvents, counters, maxSize`

- - ### Constructor Detail

    - #### AlarmHistory.AlarmHistoryMixin

          public AlarmHistory.AlarmHistoryMixin()

  - ### Method Detail

    - #### firstEvent

          public AlarmEvent firstEvent()

      Description copied from interface: `AlarmHistory`
      Returns the oldest recorded `AlarmEvent`.
      Specified by:
        `firstEvent` in interface `AlarmHistory`
      Returns:
        the first AlarmEvent in the buffer. This is the oldest event.

    - #### lastEvent

          public AlarmEvent lastEvent()

      Description copied from interface: `AlarmHistory`
      Returns the newest recorded `AlarmEvent`.
      Specified by:
        `lastEvent` in interface `AlarmHistory`
      Returns:
        the last AlarmEvent in the buffer. This is the newest event.

    - #### eventAt

          public AlarmEvent eventAt(int position)

      Description copied from interface: `AlarmHistory`
      Returns the recorded `AlarmEvent` at the given position in the buffer.
      Specified by:
        `eventAt` in interface `AlarmHistory`
      Parameters:
        `position` - the position in the buffer, counted from the beginning to obtain the AlarmEvent from. 0 means the first element.
      Returns:
        the recorded `AlarmEvent` at the given position in the buffer.

    - #### eventAtEnd

          public AlarmEvent eventAtEnd(int position)

      Description copied from interface: `AlarmHistory`
      Returns the recorded `AlarmEvent` at the given position in the buffer counted from the end.
      Specified by:
        `eventAtEnd` in interface `AlarmHistory`
      Parameters:
        `position` - the position in the buffer, counted from the end to obtain the AlarmEvent from. 0 means the last element.
      Returns:
        the recorded `AlarmEvent` at the given position in the buffer counted from the end.

    - #### addEvent

          public void addEvent(AlarmEvent event,
                      String trigger)

      Specified by:
        `addEvent` in interface `AlarmHistory`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### resetAllCounters

          public void resetAllCounters()

      Description copied from interface: `AlarmHistory`
      Resets all counters.
      Specified by:
        `resetAllCounters` in interface `AlarmHistory`

    - #### activateCounter

          public int activateCounter()

      Description copied from interface: `AlarmHistory`
      Returns the Counter of activate triggers. This method will return the number of times the `activate()` method and the `trigger()` method with an activate trigger is called.
      Specified by:
        `activateCounter` in interface `AlarmHistory`
      Returns:
        the Counter of activate triggers.

    - #### resetActivateCounter

          public void resetActivateCounter()

      Description copied from interface: `AlarmHistory`
      Resets the Activate counter.
      Specified by:
        `resetActivateCounter` in interface `AlarmHistory`