code: public boolean extendsClassOrInterface(Types types,
                                           TypeMirror typeMirror,
                                           TypeMirror toImplement) {
      String clearedToImplement = this.removeGenericsFromClassName(toImplement.toString());
      Set<TypeMirror> setOfSuperType = this.getFlattenedSupertypeHierarchy(types,
                                                                           typeMirror);
      for (TypeMirror mirror : setOfSuperType) {
        if (clearedToImplement.equals(this.removeGenericsFromClassName(mirror.toString()))) {
          return true;
        }
      }
      return false;
    }
docs: checks if a class or interface is implemented.
  
  @param types       types
  @param typeMirror  of the class to check
  @param toImplement the type mirror to implement
  @return true - class is implemented