All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mockit.external.hamcrest.core.StringEndsWith Maven / Gradle / Ivy

There is a newer version: 0.999.4
Show newest version
/*  Copyright (c) 2000-2006 hamcrest.org
 */
package mockit.external.hamcrest.core;

/**
 * Tests if the argument is a string that contains a substring.
 */
public final class StringEndsWith extends SubstringMatcher
{
   public StringEndsWith(CharSequence substring)
   {
      super(substring);
   }

   @Override
   protected boolean evalSubstringOf(CharSequence s)
   {
      return s.toString().endsWith(substring.toString());
   }

   @Override
   protected String relationship()
   {
      return "ending with";
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy