org.eclipse.eef.common.api.utils

## Class Util

- java.lang.Object
- - org.eclipse.eef.common.api.utils.Util

    public final class Util
    extends java.lang.Object

Shared utility methods.

### Method Summary

All Methods Static Methods Concrete Methods
`static <T> java.lang.Iterable<T>` `asIterable(java.lang.Object rawValue, java.lang.Class<T> clazz)` Returns the given object as an iterable and filer it with the given type.
`static java.lang.String` `firstNonNull(java.lang.String... alternatives)` Returns the first of a series of alternative string values which is not null.
`static boolean` `isBlank(java.lang.String s)` Tests if a string is blank (i.e.

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

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

### Method Detail

#### firstNonNull

    public static java.lang.String firstNonNull(java.lang.String... alternatives)

Returns the first of a series of alternative string values which is not null.

Parameters:
  `alternatives` - the alernative strings, in order of preference.
Returns:
  the first non-null alternative, or an empty string if they are all null.

#### isBlank

    public static boolean isBlank(java.lang.String s)

Tests if a string is blank (i.e. null, empty, or containing only whitespace).

Parameters:
  `s` - the string to test.
Returns:
  `true` if and only if the string is blank.

#### asIterable

    public static <T> java.lang.Iterable<T> asIterable(java.lang.Object rawValue,
                                                       java.lang.Class<T> clazz)

Returns the given object as an iterable and filer it with the given type. If the object is a single object, the we will return a collection containing said object, it the object is already a collection, we will return a new collection with all its elements.

Type Parameters:
  `T` - The type of the result wanted
Parameters:
  `rawValue` - The raw value
  `clazz` - The class of the result wanted
Returns:
  An iterable