static < T extends GridDialect > T getDialectFacetOrNull ( GridDialect gridDialect , Class < T > facetType ) { if ( hasFacet ( gridDialect , facetType ) ) { @ SuppressWarnings ( "unchecked" ) T asFacet = ( T ) gridDialect ; return asFacet ; } return null ; }
Returns the given dialect narrowed down to the given dialect facet in case it is implemented by the dialect .