Class Range
java.lang.Object
oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
oracle.communication.brm.charging.util.range.Range
- All Implemented Interfaces:
Serializable
,Cloneable
,oracle.communication.brm.charging.util.directevolution.DEvolvable
,Ranges<Long>
public final class Range
extends oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
implements Ranges<Long>
An Range is an interval with start and end boundary
The start is inclusive but the end is not.
Boundaries must be of type
It must be immutable
2 ranges are equals if and only if they have the same start and end
Follow the contract defined by the methods javadoc
long
Typically, they expressed time in milliseconds since 1970-01-01T00:00:00Z.
A range must abide by the following contract:
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final long
static final long
static final int
static final int
static final long
Time constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether an instant is within the range boundaries (lower bound is inclusive, upper bound is exclusive)oracle.communication.brm.charging.util.directevolution.DEvolvable
empty()
A range of size 0L starting at this instance start timeend()
boolean
void
giveInitializerTo
(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) int
hashCode()
Get the common range between 2 ranges.boolean
isEmpty()
static Range
make
(long start, long end) factory methodfilter range: exclude a range from current range Note: does not support excluding a range that would result in more than one range.Add 2 rangessize()
start()
toString()
Methods inherited from class oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
clone, getEvolutionData, setEvolutionData
-
Field Details
-
POF_END_ID
public static final int POF_END_ID- See Also:
-
POF_START_ID
public static final int POF_START_ID- See Also:
-
SEC
public static final long SECTime constants- See Also:
-
MIN
public static final long MIN- See Also:
-
HOUR
public static final long HOUR- See Also:
-
DAY
public static final long DAY- See Also:
-
-
Constructor Details
-
Range
public Range()Default constructor required for evolution
-
-
Method Details
-
make
factory method- Parameters:
start
- start timeend
- end time- Returns:
- new Range
-
createInstance
public oracle.communication.brm.charging.util.directevolution.DEvolvable createInstance()- Specified by:
createInstance
in interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
giveInitializerTo
public void giveInitializerTo(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) - Specified by:
giveInitializerTo
in interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
empty
Description copied from interface:Ranges
A range of size 0L starting at this instance start time -
plus
Description copied from interface:Ranges
Add 2 ranges -
isEmpty
public boolean isEmpty() -
intersect
Description copied from interface:Ranges
Get the common range between 2 ranges. No restrictions. -
size
-
shift
-
end
-
start
-
minus
Description copied from interface:Ranges
filter range: exclude a range from current range Note: does not support excluding a range that would result in more than one range. -
getRanges
-
contains
Description copied from interface:Ranges
Whether an instant is within the range boundaries (lower bound is inclusive, upper bound is exclusive) -
toString
- Overrides:
toString
in classoracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
-
toTimeOfDayString
-
equals
-
hashCode
public int hashCode() -
toRangesString
- Specified by:
toRangesString
in interfaceRanges<Long>
- Returns:
- string representation of the ranges
-