Class Wrapper<T>

java.lang.Object
com.landawn.abacus.util.Wrapper<T>
Type Parameters:
T -
All Implemented Interfaces:
Immutable

@Immutable public final class Wrapper<T> extends Object implements Immutable
Since:
0.8
Author:
Haiyang Li
See Also:
  • Method Details

    • of

      public static <T> Wrapper<T> of(T array)
      Type Parameters:
      T -
      Parameters:
      array -
      Returns:
    • of

      public static <T> Wrapper<T> of(T value, ToIntFunction<? super T> hashFunction, BiPredicate<? super T,? super T> equalsFunction)
      Type Parameters:
      T -
      Parameters:
      value -
      hashFunction -
      equalsFunction -
      Returns:
    • of

      public static <T> Wrapper<T> of(T value, ToIntFunction<? super T> hashFunction, BiPredicate<? super T,? super T> equalsFunction, Function<? super T,String> toStringFunction)
      Type Parameters:
      T -
      Parameters:
      value -
      hashFunction -
      equalsFunction -
      toStringFunction -
      Returns:
    • value

      public T value()
      Returns:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns: