Class StringEndsWith

java.lang.Object
it.unimi.di.prog2.h13.StringEndsWith
All Implemented Interfaces:
Predicate<String>

class StringEndsWith extends Object implements Predicate<String>
A predicate checking whether strings end with a given suffix.
  • Field Details

    • suffix

      private final String suffix
      The suffix to check for.
  • Constructor Details

    • StringEndsWith

      public StringEndsWith(String suffix)
      Creates a new predicate checking for the given suffix.
      Parameters:
      suffix - the suffix to check for.
      Throws:
      NullPointerException - if suffix is null.
  • Method Details