Class ArrayToolkit


  • public class ArrayToolkit
    extends java.lang.Object
    Various methods that work with arrays.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayToolkit()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T[] filter​(T[] items, java.util.List<java.lang.Integer> excludeIndexes)
      Filter specified indexes from an array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArrayToolkit

        public ArrayToolkit()
    • Method Detail

      • filter

        public static <T> T[] filter​(T[] items,
                                     java.util.List<java.lang.Integer> excludeIndexes)
        Filter specified indexes from an array.
        Type Parameters:
        T - input array type
        Parameters:
        items - input array
        excludeIndexes - Array indexes to remove. This list must be sorted.
        Returns:
        a new array containing values from the input array except for the excluded indexes