|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcomp202.fall2007.a5.filter.SongFilter
public abstract class SongFilter
A SongFilter
defines a condition that Song
s
can satisfy, and provides a method to verify whether or not a
Song
satisfies this condition.
Constructor Summary | |
---|---|
SongFilter()
Creates a new SongFilter . |
Method Summary | |
---|---|
abstract boolean |
accept(Song song)
Determines whether the Song satisfies or passes the
condition defines by this SongFilter . |
abstract String |
toString()
Returns a String representation of this
SongFilter in the form of a boolean expression which
determines the Song s it accepts and those it rejects. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SongFilter()
SongFilter
.
Method Detail |
---|
public abstract boolean accept(Song song)
Determines whether the Song
satisfies or passes the
condition defines by this SongFilter
. Such a
Song
is said to be accepted by the SongFilter
;
Song
s that do not satisfy the condition defined by this
SongFilter
are said to be rejected by the latter.
song
- The Song
to be tried with this filter.
true
if this SongFilter
accepts
song
, false
otherwise.public abstract String toString()
Returns a String
representation of this
SongFilter
in the form of a boolean expression which
determines the Song
s it accepts and those it rejects.
toString
in class Object
String
representation of this
SongFilter
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |