Class ChainedValueProvider

java.lang.Object
nl.jqno.equalsverifier.internal.valueproviders.ChainedValueProvider
All Implemented Interfaces:
ValueProvider

public class ChainedValueProvider extends Object implements ValueProvider
Provider of prefabricated instances of classes, delegating to other ValueProviders in sequence.
  • Field Details

  • Constructor Details

    • ChainedValueProvider

      public ChainedValueProvider(ValueProvider... providers)
      Constructor.
      Parameters:
      providers - A list of ValueProviders that are checked in turn for a value.
  • Method Details

    • provide

      public <T> Optional<Tuple<T>> provide(TypeTag tag, Attributes attributes)
      Returns a tuple of two different prefabricated values of the specified type.
      Specified by:
      provide in interface ValueProvider
      Type Parameters:
      T - The returned tuple will have this generic type.
      Parameters:
      tag - A description of the desired type, including generic parameters.
      attributes - The attributes of the field that the provided values must be linked to.
      Returns:
      A tuple of two different values of the given type, or an empty Optional if none could be found.