Class StopWatch.Split
java.lang.Object
org.apache.commons.lang3.tuple.Pair<String,Duration>
org.apache.commons.lang3.tuple.ImmutablePair<String,Duration>
org.apache.commons.lang3.time.StopWatch.Split
- All Implemented Interfaces:
Serializable, Comparable<Pair<String,Duration>>, Map.Entry<String, Duration>
- Enclosing class:
StopWatch
Stores a split as a label and duration.
- Since:
- 3.20.0
- See Also:
-
Field Summary
Fields inherited from class ImmutablePair
EMPTY_ARRAY, left, rightModifier and TypeFieldDescriptionstatic final ImmutablePair<?,?>[] An empty array.final StringLeft objectfinal DurationRight object -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ImmutablePair
emptyArray, getLeft, getRight, left, nullPair, of, of, ofNonNull, right, setValueModifier and TypeMethodDescriptionstatic <L,R> ImmutablePair<L, R>[] Returns the empty array singleton that can be assigned without compiler warning.getLeft()Gets the left element from this pair.getRight()Gets the right element from this pair.static <L,R> Pair <L, R> left(L left) Creates an immutable pair of two objects inferring the generic types.static <L,R> ImmutablePair <L, R> nullPair()Returns an immutable pair of nulls.static <L,R> ImmutablePair <L, R> Creates an immutable pair from a map entry.static <L,R> ImmutablePair <L, R> of(L left, R right) Creates an immutable pair of two objects inferring the generic types.static <L,R> ImmutablePair <L, R> ofNonNull(L left, R right) Creates an immutable pair of two non-null objects inferring the generic types.static <L,R> Pair <L, R> right(R right) Creates an immutable pair of two objects inferring the generic types.Sets no value and always throwsUnsupportedOperationException.Methods inherited from class Pair
accept, apply, compareTo, equals, getKey, getValue, hashCode, toStringModifier and TypeMethodDescription<E extends Throwable>
voidaccept(FailableBiConsumer<String, Duration, E> consumer) Accepts this key and value as arguments to the given consumer.<V, E extends Throwable>
Vapply(FailableBiFunction<String, Duration, V, E> function) Applies this key and value as arguments to the given function.intCompares the pair based on the left element followed by the right element.booleanCompares this pair to another based on the two elements.final StringgetKey()Gets the key from this pair.getValue()Gets the value from this pair.inthashCode()Returns a suitable hash code.Formats the receiver using the given format.
-
Constructor Details
-
Split
-
-
Method Details
-
getDuration
-
getLabel
-
toString
-