Package org.hamcrest

Class Description.NullDescription

java.lang.Object
org.hamcrest.Description.NullDescription
All Implemented Interfaces:
Description
Enclosing interface:
Description

public static final class Description.NullDescription extends Object implements Description
A description that consumes input but does nothing.
  • Constructor Details

    • NullDescription

      public NullDescription()
      Constructor.
  • Method Details

    • appendDescriptionOf

      public Description appendDescriptionOf(SelfDescribing value)
      Description copied from interface: Description
      Appends the description of a SelfDescribing value to this description.
      Specified by:
      appendDescriptionOf in interface Description
      Parameters:
      value - the value to append.
      Returns:
      the update description when displaying the matcher error.
    • appendList

      public Description appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values)
      Description copied from interface: Description
      Appends a list of SelfDescribing objects to the description.
      Specified by:
      appendList in interface Description
      Parameters:
      start - the prefix.
      separator - the separator.
      end - the suffix.
      values - the values to append.
      Returns:
      the update description when displaying the matcher error.
    • appendText

      public Description appendText(String text)
      Description copied from interface: Description
      Appends some plain text to the description.
      Specified by:
      appendText in interface Description
      Parameters:
      text - the text to append.
      Returns:
      the update description when displaying the matcher error.
    • appendValue

      public Description appendValue(Object value)
      Description copied from interface: Description
      Appends an arbitrary value to the description.
      Specified by:
      appendValue in interface Description
      Parameters:
      value - the object to append.
      Returns:
      the update description when displaying the matcher error.
    • appendValueList

      public <T> Description appendValueList(String start, String separator, String end, T... values)
      Description copied from interface: Description
      Appends a list of values to the description.
      Specified by:
      appendValueList in interface Description
      Type Parameters:
      T - the description type.
      Parameters:
      start - the prefix.
      separator - the separator.
      end - the suffix.
      values - the values to append.
      Returns:
      the update description when displaying the matcher error.
    • appendValueList

      public <T> Description appendValueList(String start, String separator, String end, Iterable<T> values)
      Description copied from interface: Description
      Appends a list of values to the description.
      Specified by:
      appendValueList in interface Description
      Type Parameters:
      T - the description type.
      Parameters:
      start - the prefix.
      separator - the separator.
      end - the suffix.
      values - the values to append.
      Returns:
      the update description when displaying the matcher error.
    • toString

      public String toString()
      Overrides:
      toString in class Object