Returns the number of points in this pattern. This value is always positive (>=1). If the number of points is greater than
Long.MAX_VALUE, returns
Long.MAX_VALUE.
Warning! This method can work slowly for some forms of large patterns: the required time can be O(N), where N is the number of points (result of this method). In these cases, this method can also throw {@link TooManyPointsInPatternError}or OutOfMemoryError.
There is a guarantee, that if this object implements {@link QuickPointCountPattern} interface,then this method works very quickly (O(1) operations) and without exceptions.
There is a guarantee, that if this object implements {@link DirectPointSetPattern} interface,then the result of this method is not greater than Integer.MAX_VALUE.
Note: if this method returns some value greater than Integer.MAX_VALUE, it means that you cannot use {@link #points()} and {@link #roundedPoints()} methods,because Java Set object cannot contain more than Integer.MAX_VALUE elements.
@return the number of {@link Point points} in this pattern.
@throws TooManyPointsInPatternError for some forms of large patterns, if the number of points is greater thanInteger.MAX_VALUE or, in some rare situations, is near this limit (OutOfMemoryError can be also thrown instead of this exception).
@see #largePointCount()
@see #isSurelySinglePoint
@see QuickPointCountPattern#isPointCountVeryLarge()