Class ConditionMessage.ItemsBuilder

java.lang.Object
org.springframework.boot.autoconfigure.condition.ConditionMessage.ItemsBuilder
Enclosing class:
ConditionMessage

public final class ConditionMessage.ItemsBuilder extends Object
Builder used to create an ConditionMessage.ItemsBuilder for a condition.
  • Method Details

    • atAll

      public ConditionMessage atAll()
      Used when no items are available. For example didNotFind("any beans").atAll() results in the message "did not find any beans".
      Returns:
      a built ConditionMessage
    • items

      public ConditionMessage items(Object... items)
      Indicate the items. For example didNotFind("bean", "beans").items("x", "y") results in the message "did not find beans x, y".
      Parameters:
      items - the items (may be null)
      Returns:
      a built ConditionMessage
    • items

      public ConditionMessage items(ConditionMessage.Style style, Object... items)
      Indicate the items. For example didNotFind("bean", "beans").items("x", "y") results in the message "did not find beans x, y".
      Parameters:
      style - the render style
      items - the items (may be null)
      Returns:
      a built ConditionMessage
    • items

      public ConditionMessage items(Collection<?> items)
      Indicate the items. For example didNotFind("bean", "beans").items(Collections.singleton("x") results in the message "did not find bean x".
      Parameters:
      items - the source of the items (may be null)
      Returns:
      a built ConditionMessage
    • items

      public ConditionMessage items(ConditionMessage.Style style, Collection<?> items)
      Indicate the items with a ConditionMessage.Style. For example didNotFind("bean", "beans").items(Style.QUOTE, Collections.singleton("x") results in the message "did not find bean 'x'".
      Parameters:
      style - the render style
      items - the source of the items (may be null)
      Returns:
      a built ConditionMessage