ListUtil (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.util

## Class ListUtil

- java.lang.Object
- - org.apache.fop.util.ListUtil

-     public final class ListUtil
      extends Object

  Provides helper functions for `List`.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `getLast(List<T> list)` Retrieve the last element from a list.
    `static ListElement` | `getLastListElement(List list)`
    `static <T> T` | `removeLast(List<T> list)` Retrieve and remove the last element from a list.

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

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

- - ### Method Detail

    - #### getLast

          public static <T> T getLast(List<T> list)

      Retrieve the last element from a list.
      Type Parameters:
        `T` - the type of objects stored in the list
      Parameters:
        `list` - the list to work on
      Returns:
        last element

    - #### getLastListElement

          public static ListElement getLastListElement(List list)

    - #### removeLast

          public static <T> T removeLast(List<T> list)

      Retrieve and remove the last element from a list.
      Type Parameters:
        `T` - the type of objects stored in the list
      Parameters:
        `list` - the list to work on
      Returns:
        previous last element

Copyright © 2025 Apache Software Foundation. All rights reserved.