public final class TraitUtil extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TraitUtil.TraitViewConstructor<TRAIT>
A functional interface describing the constructor for a class that
implements a specific trait.
|
Modifier and Type | Method and Description |
---|---|
static <TRAIT extends Document> |
viewOf(Document document,
Class<TRAIT> trait,
TraitUtil.TraitViewConstructor<? extends TRAIT> constructor)
Returns a view of the specified document that implements the specified
trait.
|
public static <TRAIT extends Document> TRAIT viewOf(Document document, Class<TRAIT> trait, TraitUtil.TraitViewConstructor<? extends TRAIT> constructor)
TRAIT
- the trait classdocument
- the document to create a view oftrait
- the trait typeconstructor
- constructor to use for documents that lack the traitCopyright © 2018 Speedment, Inc.. All rights reserved.