Class RegionMembershipAnd
A RegionMembership implementation that uses an AND operation to check membership.
This class extends RegionMembership and implements the isMemberFlag method using an AND operation to determine if a region is a member.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a RegionMembershipAnd with no regions set.RegionMembershipAnd(int index) Constructs a RegionMembershipAnd with a single region set. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisMemberFlag(byte membership, byte flag) Checks if a given membership flag is set for a specific region.Methods inherited from class org.anchoranalysis.mpp.bean.regionmap.RegionMembership
canEqual, equals, flags, hashCode, isBit0, isBit1, isBit2, isBit3, isBit4, isBit5, isBit6, isBit7, setBit0, setBit1, setBit2, setBit3, setBit4, setBit5, setBit6, setBit7, toStringMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
RegionMembershipAnd
public RegionMembershipAnd()Constructs a RegionMembershipAnd with no regions set. -
RegionMembershipAnd
public RegionMembershipAnd(int index) Constructs a RegionMembershipAnd with a single region set.- Parameters:
index- the index of the region to set (0-7)
-
-
Method Details
-
isMemberFlag
public boolean isMemberFlag(byte membership, byte flag) Description copied from class:RegionMembershipChecks if a given membership flag is set for a specific region.- Specified by:
isMemberFlagin classRegionMembership- Parameters:
membership- the membership byte to checkflag- the flag representing the region to check- Returns:
- true if the region is a member, false otherwise
-