Package it.tidalwave.util
Class AsExtensions
java.lang.Object
it.tidalwave.util.AsExtensions
An extension to be used with Lombok in order to provide "as" support to classes that don't implement the
As
interface. The typical usage is to retrofit legacy code.
FIXME: this class doesn't cache - every as*() call instantiates new objects.- Author:
- Fabrizio Giudici
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
static <T> T
static <T> Collection
<T> static <T> Collection
<T> static <T> Optional
<T> static <T> Optional
<T>
-
Constructor Details
-
AsExtensions
public AsExtensions()
-
-
Method Details
-
as
-
maybeAs
-
asMany
@Nonnull public static <T> Collection<T> asMany(@Nonnull Object datum, @Nonnull Class<? extends T> type) -
as
-
maybeAs
-
asMany
@Nonnull public static <T> Collection<T> asMany(@Nonnull Object datum, @Nonnull As.Type<? extends T> type)
-