# 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`

public static final class StopWatch.Split extends ImmutablePair<String,Duration>
Stores a split as a label and duration.

Since:
  3.20.0
See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class ImmutablePair

  `EMPTY_ARRAY, left, right`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Split(String label, Duration duration)`
  Constructs a Split object with label and duration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Duration`
  `getDuration()`
  Gets the duration of this split.
  `String`
  `getLabel()`
  Gets the label of this split.
  `String`
  `toString()`
  Converts this instance to a string.

  ### Methods inherited from class ImmutablePair

  `emptyArray, getLeft, getRight, left, nullPair, of, of, ofNonNull, right, setValue`

  ### Methods inherited from class Pair

  `accept, apply, compareTo, equals, getKey, getValue, hashCode, toString`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Split

    public Split(String label, Duration duration)
    Constructs a Split object with label and duration.
    Parameters:
      `label` - Label for this split.
      `duration` - Duration for this split.

- ## Method Details

  - ### getLabel

    public String getLabel()
    Gets the label of this split.
    Returns:
      The label of this split.

  - ### getDuration

    public Duration getDuration()
    Gets the duration of this split.
    Returns:
      The duration of this split..

  - ### toString

    public String toString()
    Converts this instance to a string.
    Overrides:
      `toString` in class `Pair<String,Duration>`
    Returns:
      this instance to a string.