Class EmptyObserver

  • All Implemented Interfaces:

    public class EmptyObserver
    extends Object
    implements Observer
    Basic content change observer that doesn't do anything. Useful as a "null object" for cases where another observer has not been configured, thus avoiding an extra null check when invoking the observer.
    • Field Detail

      • INSTANCE

        public static final EmptyObserver INSTANCE
        Static instance of this class, useful as a "null object".
    • Constructor Detail

      • EmptyObserver

        public EmptyObserver()
    • Method Detail

      • contentChanged

        public void contentChanged​(@NotNull
                                   @NotNull NodeState root,
                                   @NotNull CommitInfo info)
        Description copied from interface: Observer
        Observes a content change. See the Observer class javadocs and relevant repository and observer registration details for more information on when and how this method gets called.
        Specified by:
        contentChanged in interface Observer
        root - root state of the repository
        info - commit information