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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns true iftestis betweenstartandend(inclusive)static intintstatic booleanstatic booleanstatic TimecodeComparatorstatic booleanstatic booleanstatic booleanstatic TimecodeReturns the larger of a number of timecodesstatic TimecodeReturns the smaller of some timecodesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
comparein interfaceComparator<Timecode>
-
cmp
-
between
Returns true iftestis betweenstartandend(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:
-