Package com.jidesoft.range
Interface Range<T>
- All Known Implementing Classes:
AbstractNumericRange
,AbstractRange
,AggregatedRange
,BigDecimalRange
,BooleanRange
,CategoryRange
,CombinedNumericRange
,IntegerRange
,LongRange
,NumericRange
,StringRange
,TimeRange
public interface Range<T>
- Author:
- Simon White (swhite@catalysoft.com)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
You can add a property change listener if you are interested to know when the range changesvoid
Adjusts the range.boolean
Determines whether the supplied point lies within this range.Gets the registered property change listeners.getPropertyChangeListeners
(String propertyName) Gets the registered property change listeners for a property.lower()
double
maximum()
This may be the numeric representation of upper() or it may be rounded up.double
minimum()
This may be the numeric representation of lower() or it may be rounded down.void
Remove a property change listenerdouble
size()
Compute the size of the rangeupper()
-
Field Details
-
PROPERTY_MIN
The name of the minimum property. Used when firing property change events- See Also:
-
PROPERTY_MAX
The name of the maximum property. Used when firing property change events- See Also:
-
-
Method Details
-
lower
T lower()- Returns:
- the smallest value of the range
-
upper
T upper()- Returns:
- the largest value of the range
-
adjust
Adjusts the range.- Parameters:
lower
- the new smallest value of the rangeupper
- the new largest value of the range
-
minimum
double minimum()This may be the numeric representation of lower() or it may be rounded down.- Returns:
- the numeric value of the smallest value to include in the range.
-
maximum
double maximum()This may be the numeric representation of upper() or it may be rounded up.- Returns:
- The numeric value of the largest value to include in the range.
-
size
double size()Compute the size of the range -
contains
Determines whether the supplied point lies within this range. For continuous ranges this is interpreted as a pair of inequalities on the supplied value (i.e., min invalid input: '<'= x invalid input: '<'= max), but for discrete ranges thecontains()
method is more like a set membership test.- Parameters:
x
-- Returns:
- a boolean to indicate whether the supplied point lies within the range
-
addPropertyChangeListener
You can add a property change listener if you are interested to know when the range changes- Parameters:
listener
- the new property change listener
-
removePropertyChangeListener
Remove a property change listener- Parameters:
listener
- thePropertyChangeListener
to remove
-
getPropertyChangeListeners
PropertyChangeListener[] getPropertyChangeListeners()Gets the registered property change listeners.- Returns:
- the registered property change listeners.
-
getPropertyChangeListeners
Gets the registered property change listeners for a property.- Returns:
- the registered property change listeners for a property.
-