Interface IChoiceSet
public interface IChoiceSet
Represents a set of choices on a predefined or user defined property type or
property definition.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the choice set has a match for the given name.findChoice
(String name) Finds a Choice in theChoiceSet
for the given choice name.Finds a IChoice in theIChoiceSet
for its display name.findUserChoiceByDisplayName
(org.eclipse.birt.report.model.core.Module module, String name) Finds a UserChoice in theIChoiceSet
for its display name.IChoice[]
Returns an array containing the choices, the return choices are in their internal sequence.IChoice[]
Returns an array containing the choices, the return choices are sorted according to the given comparator.getName()
Returns the name of this ChoiceSet.boolean
Tests whether this is a user-defined choice set or not.
-
Method Details
-
contains
Returns true if the choice set has a match for the given name.- Parameters:
choiceName
- the choice name to match- Returns:
- true if the name matches a choice, false otherwise
-
isUserDefined
boolean isUserDefined()Tests whether this is a user-defined choice set or not.- Returns:
true
if the choice set is defined by user. Otherwise,false
.
-
getName
String getName()Returns the name of this ChoiceSet.- Returns:
- the name of the ChoiceSet
-
getChoices
IChoice[] getChoices()Returns an array containing the choices, the return choices are in their internal sequence.- Returns:
- the array of choices
-
getChoices
Returns an array containing the choices, the return choices are sorted according to the given comparator. All elements in the array must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the array).- Parameters:
c
- the comparator that will be used to sort the choices. A null value indicates that the choices are natural ordered by their name.- Returns:
- the array of choices sorted according to the given comparator.
-
findChoice
Finds a Choice in theChoiceSet
for the given choice name.- Parameters:
name
- the name of a Choice.- Returns:
- the instance of the Choice that matches or
null
if choice not found.
-
findChoiceByDisplayName
Finds a IChoice in theIChoiceSet
for its display name. For a user defined choice, the display name can benull
.- Parameters:
name
- display name of a IChoice.- Returns:
- the instance of the Choice that matches or
null
if choice is not found.
-
findUserChoiceByDisplayName
UserChoice findUserChoiceByDisplayName(org.eclipse.birt.report.model.core.Module module, String name) Finds a UserChoice in theIChoiceSet
for its display name. For a user defined choice, the display name can benull
.- Parameters:
module
- the modulename
- display name of a UserChoice.- Returns:
- the instance of the UserChoice that matches or
null
if choice is not found.
-