Class Integers

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Integer>, Collection<Integer>, List<Integer>, RandomAccess, SequencedCollection<Integer>

public class Integers extends ArrayList<Integer>
list of int
Author:
Herve Morel
See Also:
  • Constructor Details

    • Integers

      public Integers()
      Creates a new instance of Integers
    • Integers

      public Integers(List<Integer> values)
      Creates a new instance of Integers
      Parameters:
      values - initial values
  • Method Details

    • contains

      public boolean contains(int value)
      Parameters:
      value - search value
      Returns:
      true if the list containt the specified value.
    • ints

      public int[] ints()
      Returns:
      as an array of int
    • merge

      public void merge(int value)
      merge an int value to the list, i.e. add if not already in the list.
      Parameters:
      value - value to be added
    • merge

      public void merge(Integers list)
      merge a list of int to the list.
      Parameters:
      list - list to be merge with
    • merge

      public void merge(int... list)
      merge a list of int to the list.
      Parameters:
      list - list to be merge with
    • toString

      public String toString()
      Overrides:
      toString in class AbstractCollection<Integer>
    • print

      public void print(PrintWriter out)
    • convert

      public static ArrayList<Integer> convert(int[] values)