org.dropframetimecode.java
Class DropFrameTimeCode

java.lang.Object
  |
  +--org.dropframetimecode.java.DropFrameTimeCode
Direct Known Subclasses:
DFTCwrapped

public class DropFrameTimeCode
extends java.lang.Object

models the behaviour of a single timecode value. provides methos to conver the timecode value to a numerical framecoount or formatted HH:MM:SS:FF string representation.


Constructor Summary
DropFrameTimeCode()
          Creates a new instance of DropFrameTimeCode
DropFrameTimeCode(org.dropframetimecode.java.DropFrameTimeCode dftc)
          Creates a new copy of an existing DropFrameTimeCode
DropFrameTimeCode(long l)
          Creates a new instance of DropFrameTimeCode
DropFrameTimeCode(java.lang.String s)
          Creates a new instance of DropFrameTimeCode
 
Method Summary
 void decrease(org.dropframetimecode.java.DropFrameTimeCode dftc)
          Decreases this DropFrameTimeCode value.
 void decrease(long l)
          Decreases this DropFrameTimeCode value.
 void decrease(java.lang.String s)
          Decreases this DropFrameTimeCode value.
 long getFrames()
          Get a numerical framecount representation of this timecode value
 java.lang.String getString()
          Get a string representation of this timecode value
 void increase(org.dropframetimecode.java.DropFrameTimeCode dftc)
          Increases this DropFrameTimeCode value.
 void increase(long l)
          Increases this DropFrameTimeCode value.
 void increase(java.lang.String s)
          Increases this DropFrameTimeCode value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropFrameTimeCode

public DropFrameTimeCode()
Creates a new instance of DropFrameTimeCode


DropFrameTimeCode

public DropFrameTimeCode(long l)
Creates a new instance of DropFrameTimeCode

Parameters:
l - the numerical frame count

DropFrameTimeCode

public DropFrameTimeCode(java.lang.String s)
                  throws java.lang.NumberFormatException,
                         DFTCelementRangeException,
                         DFTCdroppedException
Creates a new instance of DropFrameTimeCode

Parameters:
s - the string representation of a timcode value formatted as HH:MM:SS:FF
Throws:
java.lang.NumberFormatException - if a parsed element is not a number, for example AB:CD:EF:GH
ElementRangeException - if the parsed values are out of range, for example
HH
less than 0, greater than 23
MM
less than 0, greater than 59
SS
less than 0, greater than 59
FF
less than 0, greater than 29
DroppedException - if the parsed values ae within range, but are not a representation of a legal dropframe timecode value, for example
DFTCelementRangeException
DFTCdroppedException

DropFrameTimeCode

public DropFrameTimeCode(org.dropframetimecode.java.DropFrameTimeCode dftc)
Creates a new copy of an existing DropFrameTimeCode

Parameters:
dftc - the DropFrameTimeCode to be copied
Method Detail

getFrames

public long getFrames()
Get a numerical framecount representation of this timecode value

Returns:
a long numerical framecount, always between MIN_VALUE and MAX_VALUE

getString

public java.lang.String getString()
Get a string representation of this timecode value

Returns:
a string representation of the timcode value, formatted as HH:MM:SS:FF

increase

public void increase(long l)
Increases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
l - the number of frames to increase

decrease

public void decrease(long l)
Decreases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
l - the number of frames to decrease

increase

public void increase(java.lang.String s)
              throws java.lang.NumberFormatException,
                     DFTCelementRangeException,
                     DFTCdroppedException
Increases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
s - a string, in HH:MM:SS:FF format, representing the amount to increase
Throws:
ElementRangeException - if the parsed values are out of range, for example
HH
less than 0, greater than 23
MM
less than 0, greater than 59
SS
less than 0, greater than 59
FF
less than 0, greater than 29
DroppedException - if the parsed values ae within range, but are not a representation of a legal dropframe timecode value, for example
  • 00:01:00:00
  • 00:01:00:01
java.lang.NumberFormatException
DFTCelementRangeException
DFTCdroppedException

decrease

public void decrease(java.lang.String s)
              throws java.lang.NumberFormatException,
                     DFTCelementRangeException,
                     DFTCdroppedException
Decreases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
s - a string, in HH:MM:SS:FF format, representing the amount to decrease
Throws:
ElementRangeException - if the parsed values are out of range, for example
HH
less than 0, greater than 23
MM
less than 0, greater than 59
SS
less than 0, greater than 59
FF
less than 0, greater than 29
DroppedException - if the parsed values ae within range, but are not a representation of a legal dropframe timecode value, for example
  • 00:01:00:00
  • 00:01:00:01
java.lang.NumberFormatException
DFTCelementRangeException
DFTCdroppedException

increase

public void increase(org.dropframetimecode.java.DropFrameTimeCode dftc)
Increases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
dftc - the amount to increase

decrease

public void decrease(org.dropframetimecode.java.DropFrameTimeCode dftc)
Decreases this DropFrameTimeCode value. Result is always between MIN_VALUE representing 00:00:00:00 and MAX_VALUE representing 23:59:59:29

Parameters:
dftc - the amount to decrease