@ SuppressWarnings ( "unchecked" ) private < F extends FACETTYPE > F safeGetFacet ( Class < F > type ) { for ( FACETTYPE facet : facets ) { if ( type . isInstance ( facet ) ) { return ( F ) facet ; } } return null ; }
Returns the installed facet that is an instance of the provided type argument null otherwise .