Package com.gravity9.jsonpatch
Class Iterables
- java.lang.Object
-
- com.gravity9.jsonpatch.Iterables
-
public final class Iterables extends java.lang.ObjectIterables utility class
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TgetLast(java.lang.Iterable<T> iterable)Returns the last element ofiterable.
-
-
-
Method Detail
-
getLast
public static <T> T getLast(java.lang.Iterable<T> iterable)
Returns the last element ofiterable.- Type Parameters:
T- underlying type being iterated- Parameters:
iterable- type of iterable- Returns:
- the last element of
iterable - Throws:
java.util.NoSuchElementException- if the iterable is empty
-
-