Class AltDataFilter
java.lang.Object
org.jjazz.chordleadsheet.api.item.AltDataFilter
- All Implemented Interfaces:
Serializable
A filter used to decide whether the alternate data of a CLI_ChordSymbol should be used.
This is an immutable class.
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionAltDataFilter
(List<String> values) Create a filter which accept a string if it is one of the specified values.Create a filter which just accepts strings randomly. -
Method Summary
-
Constructor Details
-
AltDataFilter
Create a filter which accept a string if it is one of the specified values.- Parameters:
values
- Must be a non empty list
-
AltDataFilter
Create a filter which just accepts strings randomly.- Parameters:
r
-
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
isRandom
public boolean isRandom()True if filter accepts strings randomly.- Returns:
-
getValues
Get the list of valid strings.- Returns:
- Null if this filter is configured as a random filter.
-
accept
Check if we accept the specified string.- Parameters:
str
-- Returns:
-