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 longstatic final longstatic final longstatic final intstatic final intstatic final longTime constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether an instant is within the range boundaries (lower bound is inclusive, upper bound is exclusive)oracle.communication.brm.charging.util.directevolution.DEvolvableempty()A range of size 0L starting at this instance start timeend()booleanvoidgiveInitializerTo(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) inthashCode()Get the common range between 2 ranges.booleanisEmpty()static Rangemake(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:
createInstancein interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
giveInitializerTo
public void giveInitializerTo(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) - Specified by:
giveInitializerToin interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
empty
Description copied from interface:RangesA range of size 0L starting at this instance start time -
plus
Description copied from interface:RangesAdd 2 ranges -
isEmpty
public boolean isEmpty() -
intersect
Description copied from interface:RangesGet the common range between 2 ranges. No restrictions. -
size
-
shift
-
end
-
start
-
minus
Description copied from interface:Rangesfilter 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:RangesWhether an instant is within the range boundaries (lower bound is inclusive, upper bound is exclusive) -
toString
- Overrides:
toStringin classoracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
-
toTimeOfDayString
-
equals
-
hashCode
public int hashCode() -
toRangesString
- Specified by:
toRangesStringin interfaceRanges<Long>- Returns:
- string representation of the ranges
-