Class FacetBase<V>

  • All Implemented Interfaces:
    Facet<V>
    Direct Known Subclasses:
    ViaFacet

    public abstract class FacetBase<V>
    extends java.lang.Object
    implements Facet<V>
    • Field Detail

      • viewerClass

        protected final java.lang.Class<? extends V> viewerClass
    • Constructor Detail

      • FacetBase

        protected FacetBase​(@Nullable java.lang.Class<? extends V> viewerClass)
    • Method Detail

      • isSupported

        public boolean isSupported()
        Description copied from interface: Facet
        Gets whether this handler is supported by the current runtime.

        If not, this can be discarded since it will fail for all viewers.

        Specified by:
        isSupported in interface Facet<V>
        Returns:
        if this handler is supported
      • isApplicable

        public boolean isApplicable​(@NonNull V viewer)
        Description copied from interface: Facet
        Gets whether this handler is applicable to a particular viewer.

        This should only be invoked if Facet.isSupported() is true.

        Specified by:
        isApplicable in interface Facet<V>
        Parameters:
        viewer - a viewer
        Returns:
        if this handler is applicable to a viewer