Class RegionMembershipWithFlags
Object
RegionMembershipWithFlags
A wrapper for
RegionMembership
that includes pre-calculated flags and a region ID.
This class combines a RegionMembership
with its calculated flags and an associated
region ID.
-
Constructor Summary
ConstructorsConstructorDescriptionRegionMembershipWithFlags
(RegionMembership regionMembership, int regionID) Creates a new instance with the given region membership and region ID. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
int
Gets the ID of the region.Gets the underlying region membership.int
hashCode()
boolean
isMemberFlag
(byte membership) Checks if the given membership flag is set for this region.toString()
-
Constructor Details
-
RegionMembershipWithFlags
Creates a new instance with the given region membership and region ID.- Parameters:
regionMembership
- the underlyingRegionMembership
regionID
- the ID of the region
-
-
Method Details
-
isMemberFlag
public boolean isMemberFlag(byte membership) Checks if the given membership flag is set for this region.- Parameters:
membership
- the membership flag to check- Returns:
- true if the region is a member, false otherwise
-
getRegionID
public int getRegionID()Gets the ID of the region.- Returns:
- the region ID
-
toString
-
getRegionMembership
Gets the underlying region membership.- Returns:
- the
RegionMembership
-
equals
-
canEqual
-
hashCode
public int hashCode()
-