compareTo

open operator override fun compareTo(other: Shape): Int

Compares this shape to the other.

If shapeId is not the same for both shapes, comparison is done by comparing shapeId with String.compareTo. If the shapeId is the same for both shapes, comparison is done by comparing shapePtSequence with Int.compareTo

Return

-1 if this shape is before the other shape, 0 if both Shapes are the same, 1 if this shape is after the other