coreEngine.reliabilityAnalysis.DataStruct

## Class WeatherEvent

- java.lang.Object
- - coreEngine.reliabilityAnalysis.DataStruct.ScenarioEvent
  - - coreEngine.reliabilityAnalysis.DataStruct.WeatherEvent

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<WeatherEvent>

      public class WeatherEvent
      extends ScenarioEvent
      implements java.lang.Comparable<WeatherEvent>

  Author:
    jltrask
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WeatherEvent.Comparators`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static long` | `serialVersionUID`

    - ### Fields inherited from class coreEngine.reliabilityAnalysis.DataStruct.ScenarioEvent

      `duration, scenarioInfo, seed, severity, startPeriod`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeatherEvent(Seed seed, ScenarioInfo scenarioInfo, int severity, int startPeriod, int duration)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(WeatherEvent o)`
    `float` | `getEventCAF()`
    `float` | `getEventCAF(int period, int segment)`
    `float` | `getEventDAF()`
    `float` | `getEventDAF(int period, int segment)`
    `float` | `getEventLAF()`
    `int` | `getEventLAF(int period, int segment)`
    `float` | `getEventOAF()`
    `float` | `getEventOAF(int period, int segment)`
    `boolean` | `getEventOccurs()`
    `float` | `getEventSAF()`
    `float` | `getEventSAF(int period, int segment)`
    `java.lang.String` | `getSeverityString()`
    `boolean` | `hasOverlap(ScenarioEvent event)` Checks to see if the event overlaps with the specified weather event.
    `boolean` | `hasOverlap(WeatherEvent wEvent)` Checks to see if the event overlaps with the specified weather event.
    `boolean` | `isValid()` Checks to see if the event is valid for the seed/scenario
    `java.lang.String` | `toString()`

    - ### Methods inherited from class coreEngine.reliabilityAnalysis.DataStruct.ScenarioEvent

      `checkActiveInPeriod, getEndPeriod, hasPeriodWrapping`

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

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

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WeatherEvent

          public WeatherEvent(Seed seed,
                              ScenarioInfo scenarioInfo,
                              int severity,
                              int startPeriod,
                              int duration)

  - ### Method Detail

    - #### hasOverlap

          public boolean hasOverlap(ScenarioEvent event)

      Checks to see if the event overlaps with the specified weather event. The input event must be a weather event or else the method will automatically return false.
      Specified by:
        `hasOverlap` in class `ScenarioEvent`
      Parameters:
        `event` - Event with which to check overlap.
      Returns:
        True if the events overlap, false otherwise.

    - #### hasOverlap

          public boolean hasOverlap(WeatherEvent wEvent)

      Checks to see if the event overlaps with the specified weather event.
      Parameters:
        `wEvent` - Event with which to check overlap.
      Returns:
        True if the events overlap, false otherwise.

    - #### getSeverityString

          public java.lang.String getSeverityString()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getEventCAF

          public float getEventCAF(int period,
                                   int segment)

      Specified by:
        `getEventCAF` in class `ScenarioEvent`

    - #### getEventCAF

          public float getEventCAF()

    - #### getEventOAF

          public float getEventOAF(int period,
                                   int segment)

      Specified by:
        `getEventOAF` in class `ScenarioEvent`

    - #### getEventOAF

          public float getEventOAF()

    - #### getEventDAF

          public float getEventDAF(int period,
                                   int segment)

      Specified by:
        `getEventDAF` in class `ScenarioEvent`

    - #### getEventDAF

          public float getEventDAF()

    - #### getEventSAF

          public float getEventSAF(int period,
                                   int segment)

      Specified by:
        `getEventSAF` in class `ScenarioEvent`

    - #### getEventSAF

          public float getEventSAF()

    - #### getEventLAF

          public int getEventLAF(int period,
                                 int segment)

      Specified by:
        `getEventLAF` in class `ScenarioEvent`

    - #### getEventLAF

          public float getEventLAF()

    - #### compareTo

          public int compareTo(WeatherEvent o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<WeatherEvent>`

    - #### getEventOccurs

          public boolean getEventOccurs()

    - #### isValid

          public boolean isValid()

      Checks to see if the event is valid for the seed/scenario
      Returns:
        true if the event is valid, false if not valid