Module omix.api
Package omix.lang

Class Time

java.lang.Object
omix.lang.Time
All Implemented Interfaces:
Serializable

public final class Time
extends Object
implements Serializable
This class represents a time in the Omix network diagrams.
Author:
Dr. Peter Droste, Omix Visualization
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Time​(int hour, int minute, int second)
    creates a time object with the given hour of day (0-23), minute (0-59) and second (0-59)
    Time​(int hour, int minute, int second, int millisecond)
    creates a time object with the given hour of day (0-23), minute (0-59), second (0-59) and millisecond (0-999)
    Time​(long date)
    creates a time with the absolute date representation
    Time​(Date date)
    creates a time upon a java standard date format.
  • Method Summary

    Modifier and Type Method Description
    int getHourOfDay()  
    int getMilliSecond()  
    int getMinute()  
    int getSecond()  
    long getValue()  
    String toString()  
    String toString​(String format)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Time

      @ConstructorProperties({"hour","minute","second"}) public Time​(int hour, int minute, int second)
      creates a time object with the given hour of day (0-23), minute (0-59) and second (0-59)
      Parameters:
      hour - hour
      minute - minute
      second - second
    • Time

      @ConstructorProperties({"hour","minute","second","millisecond"}) public Time​(int hour, int minute, int second, int millisecond)
      creates a time object with the given hour of day (0-23), minute (0-59), second (0-59) and millisecond (0-999)
      Parameters:
      hour - hour
      minute - minute
      second - second
      millisecond - millisecond
    • Time

      @OVLInaccessible public Time​(long date)
      creates a time with the absolute date representation
      Parameters:
      date - data
    • Time

      @OVLInaccessible public Time​(Date date)
      creates a time upon a java standard date format.
      Parameters:
      date - Java date
  • Method Details

    • getHourOfDay

      public int getHourOfDay()
      Returns:
      the hour of this time
    • getMinute

      public int getMinute()
      Returns:
      the minute of this time
    • getSecond

      public int getSecond()
      Returns:
      the second of this time
    • getMilliSecond

      public int getMilliSecond()
      Returns:
      the millisecond of this time
    • getValue

      @OVLInaccessible public long getValue()
      Returns:
      the absolute value
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the time as mm:SS:sss
      See Also:
      Object.toString()
    • toString

      public String toString​(String format)
      Parameters:
      format - a format which has to contain hh for hour, mm for minutes, SS for seconds and sss for milliseconds.
      Returns:
      a string representation of the time according the submitted format