Package com.tagtraum.beatunes.matchlist
Class LimitSongFilter
- java.lang.Object
-
- com.tagtraum.beatunes.matchlist.LimitSongFilter
-
- All Implemented Interfaces:
Serializable
,Predicate<AudioSong>
- Direct Known Subclasses:
GBLimitFilter
,HourLimitFilter
,MBLimitFilter
,MinuteLimitFilter
,SongLimitFilter
public abstract class LimitSongFilter extends Object implements Predicate<AudioSong>, Serializable
Stateful predicate/filter that keeps track of a certain aspect of all songs and rejects songs as soon as a limit is reached.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
ONE_DAY
One day.static long
ONE_GB
One gb.static long
ONE_HOUR
One hour.static long
ONE_KB
One kb.static long
ONE_MB
One mb.static long
ONE_MINUTE
One minute.static long
ONE_SECOND
One second.static long
ONE_WEEK
One week.
-
Constructor Summary
Constructors Constructor Description LimitSongFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
abstract String
getLabel()
int
getLimit()
int
hashCode()
abstract void
reset()
Resets the state of this filter.void
setLimit(int limit)
-
-
-
Field Detail
-
ONE_SECOND
public static final long ONE_SECOND
One second.- See Also:
- Constant Field Values
-
ONE_MINUTE
public static final long ONE_MINUTE
One minute.- See Also:
- Constant Field Values
-
ONE_HOUR
public static final long ONE_HOUR
One hour.- See Also:
- Constant Field Values
-
ONE_DAY
public static final long ONE_DAY
One day.- See Also:
- Constant Field Values
-
ONE_WEEK
public static final long ONE_WEEK
One week.- See Also:
- Constant Field Values
-
ONE_KB
public static final long ONE_KB
One kb.- See Also:
- Constant Field Values
-
ONE_MB
public static final long ONE_MB
One mb.- See Also:
- Constant Field Values
-
ONE_GB
public static final long ONE_GB
One gb.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLimit
public int getLimit()
-
setLimit
public void setLimit(int limit)
-
reset
public abstract void reset()
Resets the state of this filter.
-
getLabel
public abstract String getLabel()
- Returns:
- a display label for this filter
-
-