Documentation of 'us.bpsm.edn.protocols.Protocol' Java class
Protocol
us.bpsm.edn.protocols

Interface Protocol<F>



  • public interface Protocol<F>
    A Protocol is a thread-safe immutable mapping from classes to values of some type F. Each Protocol is created by a Protocol.Builder.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  Protocol.Builder<F>
      A single-use builder for Protocol.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      F lookup(java.lang.Class selfClass)
      Return the F associated with selfClass.
      java.lang.String name()
      The name of this protocol.
    • Method Detail

      • name

        java.lang.String name()
        The name of this protocol. (This is intended to support debugging scenarios.)
      • lookup

        F lookup(java.lang.Class selfClass)
        Return the F associated with selfClass.

        If the Protocol does not contain a mapping for exactly selfClass, then try selfClass's supertypes in C3 linearized order, only returning null when all sueprtypes have been tried without finding a match.

        selfClass may be null, in which case return the F associated with null. null has no supertypes, so if no F is associated with null, return null.

        Parameters:
        selfClass - find an F for this class. May be null.
        Returns:
        an F, or null.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.