我有一个数组列表,其中所有条目如下所示:
ListOfBooks.add(new Book("Holes", "Louis Sachar", 440419468, "Fiction", 1998, 5, 4));
但是我只知道如何过滤掉包含字符串的数组列表。我正在使用构造函数进行输入:
public Book(String a, String b, int c, String d, int e, int f, int g) {
this.title = a;
this.author = b;
this.isbn = c;
this.genre = d;
this.year = e;
this.rating = f;
this.copies = g;
}
我的问题是,如何仅根据书名过滤书籍清单?