public class

Wrapper

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.Wrapper<T>

Class Overview

Wrap an object. Akin to Optional with support for null. This class implements hashCode() and equals(Object).

Summary

Fields
public static final Wrapper<?> NULL
Public Methods
boolean equals(Object obj)
T get()
Retrieve the wrapped value.
int hashCode()
String toString()
static <T> Wrapper<T> wrap(T object)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Wrapper<?> NULL

Public Methods

public boolean equals (Object obj)

public T get ()

Retrieve the wrapped value.

Returns
  • the wrapped value, which may be null if null was wrapped

public int hashCode ()

public String toString ()

public static Wrapper<T> wrap (T object)