Class TestConfigSupplier<M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>

  • Type Parameters:
    M - The message type.
    F - The message field type.
    All Implemented Interfaces:
    java.util.function.Supplier<M>, ConfigSupplier<M,F>

    public class TestConfigSupplier<M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>
    extends UpdatingConfigSupplier<M,F>
    Config supplier meant for testing only. It is an updating config supplier, but that exposes the config update method itself.
    • Constructor Detail

      • TestConfigSupplier

        public TestConfigSupplier​(@Nonnull
                                  M initialConfig)
        Start with an initial config value.
        Parameters:
        initialConfig - The initial config value.
      • TestConfigSupplier

        public TestConfigSupplier​(@Nonnull
                                  java.time.Clock clock,
                                  @Nonnull
                                  M initialConfig)
        Start with an initial config value.
        Parameters:
        clock - The clock to use for timing.
        initialConfig - The initial config value.
    • Method Detail

      • testUpdate

        public void testUpdate​(@Nonnull
                               M newInstance)
        Update the current config and trigger updates.
        Parameters:
        newInstance - The new config instance.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getName

        public java.lang.String getName()
        Description copied from interface: ConfigSupplier
        Get a simple descriptive name for this config supplier.
        Returns:
        The supplier name.