public class RangeArrayPropertyEditor
extends java.beans.PropertyEditorSupport
Examples:
'1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60'
'36, 14, 1-10, 15, 49-57' is equal to '36-48, 14-14, 1-10, 15-35, 49-57'
Property editor also allows to validate whether ranges are disjoint. Validation
can be turned on/off by using setForceDisjointRanges(boolean)
. By default
validation is turned off.
Constructor and Description |
---|
RangeArrayPropertyEditor() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsText() |
void |
setAsText(java.lang.String text) |
void |
setForceDisjointRanges(boolean forceDisjointRanges)
Set force disjoint ranges.
|
public void setForceDisjointRanges(boolean forceDisjointRanges)
forceDisjointRanges
- true to force disjoint ranges.public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
java.lang.IllegalArgumentException
public java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport