Package com.uca.flights

## Class Jump

- java.lang.Object
- - com.uca.flights.Jump

All Implemented Interfaces:
  `java.lang.Cloneable`, `java.util.Iterator<Jump>`

    public class Jump
    extends java.lang.Object
    implements java.util.Iterator<Jump>, java.lang.Cloneable

Represent an jump : two step for arrival and departure

### Constructor Summary

Constructors
`Jump​(Step departure, Step arrival)` Constructor
`Jump​(Step departure, Step arrival, Jump next)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.Object` `clone()` Redefinition of clone
`java.time.Duration` `getDuration()` Getter
`Jump` `getPreced()` Getter
`boolean` `hasNext()` Getter, implementation of iterator
`Jump` `next()` Getter, implementation of iterator

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, remove`

### Constructor Detail

#### Jump

    public Jump​(Step departure,
                Step arrival)

Constructor

Parameters:
  `departure` - the departure step
  `arrival` - the arrival step
Throws:
  `java.lang.IllegalArgumentException` - on null parameter or departure after arrival

#### Jump

    public Jump​(Step departure,
                Step arrival,
                Jump next)

Constructor

Parameters:
  `departure` - the departure step
  `arrival` - the arrival step
  `next` - the next jump
Throws:
  `java.lang.IllegalArgumentException` - on null parameter, departure after arrival or next jump before this one

### Method Detail

#### next

    public Jump next()

Getter, implementation of iterator

Specified by:
  `next` in interface `java.util.Iterator<Jump>`
Returns:
  next jump

#### hasNext

    public boolean hasNext()

Getter, implementation of iterator

Specified by:
  `hasNext` in interface `java.util.Iterator<Jump>`
Returns:
  if next jump exist

#### getPreced

    public Jump getPreced()

Getter

Returns:
  preceding jump

#### getDuration

    public java.time.Duration getDuration()

Getter

Returns:
  duration of jump

#### clone

    public java.lang.Object clone()

Redefinition of clone

Overrides:
  `clone` in class `java.lang.Object`
Returns:
  new jump with clone of the jump chain