org.springframework.messaging.handler

## Class AbstractMessageCondition<T extends AbstractMessageCondition<T>>

- java.lang.Object
- - org.springframework.messaging.handler.AbstractMessageCondition<T>

- Type Parameters:
    `T` - the kind of condition that this condition can be combined with or compared to
  All Implemented Interfaces:
    MessageCondition<T>
  Direct Known Subclasses:
    DestinationPatternsMessageCondition, RSocketFrameTypeMessageCondition, SimpMessageTypeMessageCondition

      public abstract class AbstractMessageCondition<T extends AbstractMessageCondition<T>>
      extends Object
      implements MessageCondition<T>

  Base class for `MessageCondition's` that pre-declares abstract methods `getContent()` and `getToStringInfix()` in order to provide implementations of `equals(Object)`, `hashCode()`, and `toString()`.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMessageCondition()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `protected abstract Collection<?>` | `getContent()` Return the collection of objects the message condition is composed of (e.g.
    `protected abstract String` | `getToStringInfix()` The notation to use when printing discrete items of content.
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.messaging.handler.MessageCondition

      `combine, compareTo, getMatchingCondition`

- - ### Constructor Detail

    - #### AbstractMessageCondition

          public AbstractMessageCondition()

  - ### Method Detail

    - #### equals

          public boolean equals(@Nullable
                                Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getContent

          protected abstract Collection<?> getContent()

      Return the collection of objects the message condition is composed of (e.g. destination patterns), never `null`.

    - #### getToStringInfix

          protected abstract String getToStringInfix()

      The notation to use when printing discrete items of content. For example " || " for URL patterns or " && " for param expressions.