Package com.peterphi.std.types
Class TimecodeComparator
java.lang.Object
com.peterphi.std.types.TimecodeComparator
- All Implemented Interfaces:
Comparator<Timecode>
Compares Timecodes in order of how much time they represent
This means that 00:00:00:02@25 is greater than 00:00:00:1920@48kHz
This means that 00:00:00:02@25 is greater than 00:00:00:1920@48kHz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Returns true iftest
is betweenstart
andend
(inclusive)static int
int
static boolean
static boolean
static TimecodeComparator
static boolean
static boolean
static boolean
static Timecode
Returns the larger of a number of timecodesstatic Timecode
Returns the smaller of some timecodesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TimecodeComparator
public TimecodeComparator()
-
-
Method Details
-
getInstance
-
compare
- Specified by:
compare
in interfaceComparator<Timecode>
-
cmp
-
between
Returns true iftest
is betweenstart
andend
(inclusive)- Parameters:
test
-start
-end
-- Returns:
-
eq
-
gt
-
lt
-
ge
-
le
-
max
Returns the larger of a number of timecodes- Parameters:
timecodes
- some timecodes- Returns:
-
min
Returns the smaller of some timecodes- Parameters:
timecodes
- some timecodes- Returns:
-