Package org.goplanit.utils.cumulatives
Class CumulativePointImpl
- java.lang.Object
-
- org.goplanit.utils.cumulatives.CumulativePointImpl
-
- All Implemented Interfaces:
Serializable
,CumulativePoint
public class CumulativePointImpl extends Object implements CumulativePoint
Represents a cumulative point in time- Author:
- markr
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CumulativePointImpl(double cumulativeCount, double referenceTimeInSeconds)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
computeAbsFlowRate(CumulativePoint adjacentCumulativePoint)
Compute the absolute flow rate in cumulative units/hdouble
getAbsCumulativeDifferenceWith(CumulativePoint otherCumulative)
Absolute cumulative difference between this and passed in cumulative pointdouble
getAbsTimeDifferenceWith(CumulativePoint otherCumulative)
Absolute time difference in seconds between this and passed in cumulative pointdouble
getCumulativeCount()
double
getReferenceTimeInSeconds()
boolean
isEarlier(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs earlier (given epsilon) than the passed in other pointboolean
isEarlierOrEqual(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs earlier or equal (given epsilon) than the passed in other pointboolean
isLater(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs later (given epsilon) than the passed in other pointboolean
isLaterOrEqual(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs later or equal (given epsilon) than the passed in other point
-
-
-
Method Detail
-
getAbsTimeDifferenceWith
public double getAbsTimeDifferenceWith(CumulativePoint otherCumulative)
Absolute time difference in seconds between this and passed in cumulative point- Specified by:
getAbsTimeDifferenceWith
in interfaceCumulativePoint
- Parameters:
otherCumulative
- to compare with- Returns:
- difference in seconds
-
getAbsCumulativeDifferenceWith
public double getAbsCumulativeDifferenceWith(CumulativePoint otherCumulative)
Absolute cumulative difference between this and passed in cumulative point- Specified by:
getAbsCumulativeDifferenceWith
in interfaceCumulativePoint
- Parameters:
otherCumulative
- to compare with- Returns:
- difference in cumulative units
-
computeAbsFlowRate
public double computeAbsFlowRate(CumulativePoint adjacentCumulativePoint)
Compute the absolute flow rate in cumulative units/h- Specified by:
computeAbsFlowRate
in interfaceCumulativePoint
- Parameters:
adjacentCumulativePoint
- to use- Returns:
- flow rate between adjacent points in cumulative units/h
-
isLater
public boolean isLater(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs later (given epsilon) than the passed in other point- Specified by:
isLater
in interfaceCumulativePoint
- Parameters:
otherCumulativePoint
- to compare withtimeInSecondsEpsilon
- epsilon- Returns:
- true if later
-
isLaterOrEqual
public boolean isLaterOrEqual(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs later or equal (given epsilon) than the passed in other point- Specified by:
isLaterOrEqual
in interfaceCumulativePoint
- Parameters:
otherCumulativePoint
- to compare withtimeInSecondsEpsilon
- epsilon- Returns:
- true if later
-
isEarlier
public boolean isEarlier(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs earlier (given epsilon) than the passed in other point- Specified by:
isEarlier
in interfaceCumulativePoint
- Parameters:
otherCumulativePoint
- to compare withtimeInSecondsEpsilon
- epsilon- Returns:
- true if later
-
isEarlierOrEqual
public boolean isEarlierOrEqual(CumulativePoint otherCumulativePoint, double timeInSecondsEpsilon)
Verify if this point occurs earlier or equal (given epsilon) than the passed in other point- Specified by:
isEarlierOrEqual
in interfaceCumulativePoint
- Parameters:
otherCumulativePoint
- to compare withtimeInSecondsEpsilon
- epsilon- Returns:
- true if later
-
getReferenceTimeInSeconds
public double getReferenceTimeInSeconds()
- Specified by:
getReferenceTimeInSeconds
in interfaceCumulativePoint
- Returns:
- the referenceTimeInSeconds
-
getCumulativeCount
public double getCumulativeCount()
- Specified by:
getCumulativeCount
in interfaceCumulativePoint
- Returns:
- the cumulativeCount
-
-