Class SpanSquare
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.jdk.combine.SpanSquare
-
- All Implemented Interfaces:
Combinable<SpanSquare>
public class SpanSquare extends java.lang.Object implements Combinable<SpanSquare>
-
-
Constructor Summary
Constructors Modifier Constructor Description SpanSquare(long start, long end)
SpanSquare(long start, long end, long mass)
private
SpanSquare(long start, long end, long mass, double density)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static double
calculateDensity(long start, long end, long mass)
SpanSquare
combineWith(SpanSquare other)
Combine this object with another object if it is possible and return a combined object.static SpanSquare
getMax(SpanSquare[] clusters)
java.lang.String
toString()
-
-
-
Method Detail
-
combineWith
public SpanSquare combineWith(SpanSquare other)
Description copied from interface:Combinable
Combine this object with another object if it is possible and return a combined object. This method may determine that it is not possible to combine the objects and returnnull
in that case.- Specified by:
combineWith
in interfaceCombinable<SpanSquare>
- Parameters:
other
- an object to combine this object with- Returns:
- a combined object, or
null
if the objects shouldn't be combined
-
calculateDensity
private static double calculateDensity(long start, long end, long mass)
-
getMax
public static SpanSquare getMax(SpanSquare[] clusters)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-