Module vcr4j.core

Class HMSF

java.lang.Object
org.mbari.vcr4j.time.HMSF

public class HMSF extends Object
HMSF is a container for hour, minute, second, frame as can be represented in a Timecode. Only valid HMSF instances can be constructed. Usage is: HMSF h1 = new HMSF(1, 2, 3, 4); // hour, minute,second, frame Optional<HMSF> h2 = HMSF.from("01:02:03:04"); // A timecode string HMSF h3 = HMSF.from(200, 29.97) // frames, framerate
Since:
2015-09-24T14:32:00
Author:
Brian Schlining
  • Constructor Details

    • HMSF

      public HMSF(int hour, int minute, int second, int frame)
      Default constructor
      Parameters:
      hour - 0-99
      minute - 0-59
      second - 0-59
      frame - >= 0
  • Method Details

    • from

      public static Optional<HMSF> from(String timecode)
      Build an HMSF from a timecode string ("HH:MM:SS::FF")
      Parameters:
      timecode - A string like "01:02:03:04"
      Returns:
      Optional containing an HMSF if the string is a valid timecode string.
    • from

      public static HMSF from(double frames, double frameRate)
    • zero

      public static HMSF zero()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFrame

      public int getFrame()
    • getHour

      public int getHour()
    • getMinute

      public int getMinute()
    • getSecond

      public int getSecond()