jmarkov.basic

## Class PropertiesEvent

- java.lang.Object
- - jmarkov.basic.Event
  - - jmarkov.basic.PropertiesEvent

- All Implemented Interfaces:
    java.lang.Comparable<Event>, JMarkovElement, PropertiesElement
  Direct Known Subclasses:
    DemandEvent

      public class PropertiesEvent
      extends Event
      implements PropertiesElement

  This class is an easy way to use an event that is represented by an array of int.
  Author:
    Andres Sarmiento, Germán Riaño - Universidad de Los Andes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertiesEvent(int size)` Creates a new PropertiesEvent with an array of the size indicated filled with zeros.
    `PropertiesEvent(int[] status)` Builds a new event with characteristic array as a paramenter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PropertiesEvent` | `clone()`
    `int` | `compareTo(Event e)` Returns positive if this Event has a higher number then the given event.
    `int` | `compareTo(PropertiesEvent e1)` Compares the properties in order.
    `boolean` | `equals(PropertiesEvent e)`
    `int` | `getNumProps()` Returns the number of properties in the array that characterize this element.
    `int[]` | `getProperties()` Gets the array of properties.
    `int` | `getProperty(int index)` Gets the value of this property.
    `java.lang.String` | `label()` If this function is not overriden by the user it returns the Event number.

    - ### Methods inherited from class jmarkov.basic.Event

      `description, equals, getIndex, getSet, toString`

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

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jmarkov.basic.JMarkovElement

      `description, equals, toString`

- - ### Constructor Detail

    - #### PropertiesEvent

          public PropertiesEvent(int[] status)

      Builds a new event with characteristic array as a paramenter.
      Parameters:
        `status` - characteristic array of the event.

    - #### PropertiesEvent

          public PropertiesEvent(int size)

      Creates a new PropertiesEvent with an array of the size indicated filled with zeros.
      Parameters:
        `size` - size of the characteristic array.

  - ### Method Detail

    - #### label

          public java.lang.String label()

      Description copied from class: `Event`
      If this function is not overriden by the user it returns the Event number. The user should override to give a short label description of the Event. It is highly recommended that the user overrides it to give a more descriptive label to be used when reporting the occurrance rates of the events.
      Specified by:
        `label` in interface `JMarkovElement`
      Overrides:
        `label` in class `Event`
      Returns:
        A short string description of the Event.
      See Also:
        `Event.description()`

    - #### getNumProps

          public int getNumProps()

      Returns the number of properties in the array that characterize this element.
      Specified by:
        `getNumProps` in interface `PropertiesElement`
      Returns:
        The number of properties.

    - #### compareTo

          public final int compareTo(PropertiesEvent e1)

      Compares the properties in order.
      Parameters:
        `e1` - The PropertiesEvent to compare to.
      Returns:
        +1, 0 or -1, according to whether this states dominates e1.

    - #### compareTo

          public final int compareTo(Event e)

      Description copied from class: `Event`
      Returns positive if this Event has a higher number then the given event.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<Event>`
      Overrides:
        `compareTo` in class `Event`
      See Also:
        `Comparable.compareTo(Object)`

    - #### equals

          public final boolean equals(PropertiesEvent e)

      Parameters:
        `e` - teh PropertiesEvent to compare To
      Returns:
        true if Events are equal

    - #### getProperties

          public final int[] getProperties()

      Gets the array of properties.
      Specified by:
        `getProperties` in interface `PropertiesElement`
      Returns:
        Returns the properties array.

    - #### getProperty

          public int getProperty(int index)

      Gets the value of this property.
      Specified by:
        `getProperty` in interface `PropertiesElement`
      Parameters:
        `index` -
      Returns:
        the property at the given index

    - #### clone

          public PropertiesEvent clone()

      Specified by:
        `clone` in interface `PropertiesElement`
      Overrides:
        `clone` in class `java.lang.Object`