Class DelegatingCaptionProvider<C>

java.lang.Object
org.incendo.cloud.caption.DelegatingCaptionProvider<C>
Type Parameters:
C - command sender type
All Implemented Interfaces:
CaptionProvider<C>
Direct Known Subclasses:
StandardCaptionsProvider

public abstract class DelegatingCaptionProvider<C> extends Object implements CaptionProvider<C>
Caption provider that delegates to another provider.
  • Constructor Details

    • DelegatingCaptionProvider

      public DelegatingCaptionProvider()
  • Method Details

    • delegate

      public abstract @NonNull CaptionProvider<C> delegate()
      Returns the provider to delegate to.
      Returns:
      delegate provider
    • provide

      public final @Nullable String provide(@NonNull Caption caption, @NonNull C recipient)
      Description copied from interface: CaptionProvider
      Returns the value of the given caption for the given recipient, if it recognized by this provider.
      Specified by:
      provide in interface CaptionProvider<C>
      Parameters:
      caption - the caption key
      recipient - the recipient
      Returns:
      the caption, or null