Package sop.util

# Class Optional<T>

java.lang.Object
sop.util.Optional<T>

Type Parameters:
  `T` - item type

public class Optional<T> extends Object
Backport of java.util.Optional for older Android versions.

## Constructor Summary

Constructors
Constructor
Description
`Optional()`
`Optional(T item)`

## Method Summary

Modifier and Type
Method
Description
`T`
`get()`
`boolean`
`isEmpty()`
`boolean`
`isPresent()`
`static <T> Optional<T>`
`of(T item)`
`static <T> Optional<T>`
`ofEmpty()`
`static <T> Optional<T>`
`ofNullable(T item)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Optional

public Optional()

### Optional

public Optional(T item)

## Method Details

### of

public static <T> Optional<T> of(T item)

### ofNullable

public static <T> Optional<T> ofNullable(T item)

### ofEmpty

public static <T> Optional<T> ofEmpty()

### get

public T get()

### isPresent

public boolean isPresent()

### isEmpty

public boolean isEmpty()