protected boolean matchesSafely()

in optional/src/main/java/com/spotify/hamcrest/optional/EmptyOptional.java [31:37]


  protected boolean matchesSafely(final Optional<T> item, final Description mismatchDescription) {
    if (item.isPresent()) {
      mismatchDescription.appendText("was present with ").appendValue(item.get());
      return false;
    }
    return true;
  }