coreEngine.Helper

## Class CETime

- java.lang.Object
- - coreEngine.Helper.CETime

- All Implemented Interfaces:
    java.io.Serializable

      public class CETime
      extends java.lang.Object
      implements java.io.Serializable

  This class is used to store analysis period time and perform basic modification of the time.
  Author:
    Shu Liu
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `hour` Hour of the time
    `int` | `minute` Minute of the time
    `private static long` | `serialVersionUID` serialVersionUID

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CETime()` Default Constructor (00:00)
    `CETime(int hour)` Constructor with hour only
    `CETime(int hour, int minute)` Constructor with hour and minute

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CETime` | `addTime(CETime time1, CETime time2)` Add two CETime object
    `static CETime` | `addTime(CETime time1, CETime time2, int numOfTime2)` Add multiple times of one CETime object to another
    `boolean` | `isAfter(CETime compareTime)` Method to determine if this CETime object falls after another CETime object.
    `boolean` | `isBefore(CETime compareTime)` Method to determine if this CETime object falls before another CETime object.
    `java.lang.String` | `toAMPMString()`
    `int` | `toMinute()` Convert time to number of minutes from 00:00
    `java.lang.String` | `toString()`

    - ### 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

      serialVersionUID
      See Also:
        Constant Field Values

    - #### hour

          public int hour

      Hour of the time

    - #### minute

          public int minute

      Minute of the time

  - ### Constructor Detail

    - #### CETime

          public CETime()

      Default Constructor (00:00)

    - #### CETime

          public CETime(int hour)

      Constructor with hour only
      Parameters:
        `hour` - hour the time

    - #### CETime

          public CETime(int hour,
                        int minute)

      Constructor with hour and minute
      Parameters:
        `hour` - hour of the time
        `minute` - minute of the time

  - ### Method Detail

    - #### toMinute

          public int toMinute()

      Convert time to number of minutes from 00:00
      Returns:
        number of minutes from 00:00

    - #### toString

          public java.lang.String toString()

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

    - #### toAMPMString

          public java.lang.String toAMPMString()

    - #### addTime

          public static CETime addTime(CETime time1,
                                       CETime time2)

      Add two CETime object
      Parameters:
        `time1` - first CETime object
        `time2` - second CETime object
      Returns:
        sum of the two CETime objects

    - #### addTime

          public static CETime addTime(CETime time1,
                                       CETime time2,
                                       int numOfTime2)

      Add multiple times of one CETime object to another
      Parameters:
        `time1` - first CETime object
        `time2` - second CETime object
        `numOfTime2` - number of the second CETime object to be added
      Returns:
        sum of the CETime objects

    - #### isBefore

          public boolean isBefore(CETime compareTime)

      Method to determine if this CETime object falls before another CETime object.
      Parameters:
        `compareTime` -
      Returns:

    - #### isAfter

          public boolean isAfter(CETime compareTime)

      Method to determine if this CETime object falls after another CETime object.
      Parameters:
        `compareTime` -
      Returns: