Package com.google.common.geometry
Class S2RegionUnion
java.lang.Object
com.google.common.geometry.S2RegionUnion
- All Implemented Interfaces:
S2Region
,Serializable
@GwtCompatible(serializable=true)
public class S2RegionUnion
extends Object
implements S2Region, Serializable
An S2RegionUnion represents a union of possibly overlapping regions. It is convenient for
computing a covering of a set of regions. The regions are assumed to be immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate S2Cap
private S2LatLngRect
(package private) final S2Region[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Only returns true if one of the regions fully contains the cell.boolean
Only returns true if one of the regions contains the point.boolean
Returns true if this S2RegionUnion is equal to another S2RegionUnion, where each region must be equal and in the same order.Return a bounding spherical cap.Return a bounding latitude-longitude rectangle.int
hashCode()
boolean
mayIntersect
(S2Cell cell) Returns true if the cell may intersect any region in this collection.
-
Field Details
-
regions
-
cachedCapBound
-
cachedRectBound
-
-
Constructor Details
-
S2RegionUnion
-
-
Method Details
-
contains
Only returns true if one of the regions fully contains the cell. -
contains
Only returns true if one of the regions contains the point. -
getCapBound
Description copied from interface:S2Region
Return a bounding spherical cap.- Specified by:
getCapBound
in interfaceS2Region
-
getRectBound
Description copied from interface:S2Region
Return a bounding latitude-longitude rectangle.- Specified by:
getRectBound
in interfaceS2Region
-
mayIntersect
Returns true if the cell may intersect any region in this collection.- Specified by:
mayIntersect
in interfaceS2Region
-
equals
Returns true if this S2RegionUnion is equal to another S2RegionUnion, where each region must be equal and in the same order. This method is intended only for testing purposes. NOTE: This should be rewritten to disregard order if such functionality is ever required. -
hashCode
public int hashCode()
-