Class Array<T>

java.lang.Object
org.aksw.commons.util.array.Array<T>
All Implemented Interfaces:
Serializable

public class Array<T> extends Object implements Serializable
A wrapper for arrays with hash code and equals. The main difference to Arrays.asList(Object...) is that the underlying array can be obtained from instances of this class directly. Note that List.toArray() does not support generics.
See Also:
  • Field Details

    • array

      protected T[] array
  • Constructor Details

    • Array

      public Array(T[] array)
  • Method Details

    • wrap

      public static <T> Array<T> wrap(T[] array)
    • getArray

      public T[] getArray()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object