本文整理了Java中java.util.EnumSet.containsAll()
方法的一些代码示例,展示了EnumSet.containsAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EnumSet.containsAll()
方法的具体详情如下:
包路径:java.util.EnumSet
类名称:EnumSet
方法名:containsAll
暂无
代码示例来源:origin: google/guava
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: prestodb/presto
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: google/j2objc
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: apache/hbase
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Permission)) {
return false;
}
Permission other = (Permission) obj;
if (actions.isEmpty() && other.actions.isEmpty()) {
return true;
} else if (!actions.isEmpty() && !other.actions.isEmpty()) {
if (actions.size() != other.actions.size()) {
return false;
}
return actions.containsAll(other.actions);
}
return false;
}
代码示例来源:origin: robovm/robovm
@Override
public boolean containsAll(Collection<?> collection) {
if (collection.isEmpty()) {
return true;
}
if (collection instanceof MiniEnumSet) {
MiniEnumSet<?> set = (MiniEnumSet<?>) collection;
long setBits = set.bits;
return isValidType(set.elementClass) && ((bits & setBits) == setBits);
}
return !(collection instanceof EnumSet) && super.containsAll(collection);
}
代码示例来源:origin: robovm/robovm
@Override
public boolean containsAll(Collection<?> collection) {
if (collection.isEmpty()) {
return true;
}
if (collection instanceof HugeEnumSet) {
HugeEnumSet<?> set = (HugeEnumSet<?>) collection;
if (isValidType(set.elementClass)) {
for (int i = 0; i < bits.length; i++) {
long setBits = set.bits[i];
if ((bits[i] & setBits) != setBits) {
return false;
}
}
return true;
}
}
return !(collection instanceof EnumSet) && super.containsAll(collection);
}
代码示例来源:origin: ethereum/ethereumj
private void firstRunChecks() throws InterruptedException {
if (!statesCompleted.containsAll(EnumSet.of(EthereumListener.SyncState.UNSECURE,
EthereumListener.SyncState.SECURE)))
return;
sleep(60000);
stopSync();
testLogger.info("Validating nodes: Start");
BlockchainValidation.checkNodes(ethereum, commonConfig, fatalErrors);
testLogger.info("Validating nodes: End");
testLogger.info("Validating block headers: Start");
BlockchainValidation.checkFastHeaders(ethereum, commonConfig, fatalErrors);
testLogger.info("Validating block headers: End");
firstRun.set(false);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
float weight = 0;
for (TechniqueDef techDef : techDefs) {
if (rendererCaps.containsAll(techDef.getRequiredCaps())) {
float techWeight = techDef.getWeight() + (techDef.getLightMode() == renderManager.getPreferredLightMode() ? 10f : 0);
if (techWeight > weight) {
代码示例来源:origin: wildfly/wildfly
if (!visited.containsAll(required)) {
throw SecurityLogger.ROOT_LOGGER.xmlStreamExceptionMissingAttribute(Attribute.KEYSTORE_PASSWORD.getLocalName(),
Attribute.TRUSTSTORE_PASSWORD.getLocalName(), reader.getLocation());
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
public boolean areFeaturesEnabled( Collection<AEFeature> features )
{
return this.featureFlags.containsAll( features );
}
代码示例来源:origin: org.weakref/jmxutils
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: org.apache.drill/drill-shaded-guava
@Override
public boolean containsAll(Collection<?> collection) {
if (collection instanceof ImmutableEnumSet<?>) {
collection = ((ImmutableEnumSet<?>) collection).delegate;
}
return delegate.containsAll(collection);
}
代码示例来源:origin: owlcs/owlapi
/**
* @param constructs constructs to compare
* @return true if all constructs appear in the components
*/
public boolean hasAllConstructs(Construct... constructs) {
return components.containsAll(Arrays.asList(constructs));
}
代码示例来源:origin: owlcs/owlapi
Languages(String s, Construct c, Construct... components) {
this.s = s;
this.components = EnumSet.of(c, components);
if (this.components.containsAll(Construct.incompatibleRoleFetures)) {
throw new IllegalArgumentException("Incompatible constructs: ["
+ Construct.incompatibleRoleFetures + "] cannot appear together.");
}
}
代码示例来源:origin: net.sourceforge.owlapi/owlapi-distribution
Languages(String s, Construct c, Construct... components) {
this.s = s;
this.components = EnumSet.of(c, components);
if (this.components.containsAll(Construct.incompatibleRoleFetures)) {
throw new IllegalArgumentException("Incompatible constructs: ["
+ Construct.incompatibleRoleFetures + "] cannot appear together.");
}
}
代码示例来源:origin: com.isotrol.impe3/impe3-pms-core
/**
* Returns whether the user has set of portal authorities granted.
* @param id Portal Id.
* @param pas Portal authorities to check.
* @return True if the user has the authorities granted.
*/
public boolean hasPortal(UUID id, Collection<PortalAuthority> pas) {
return portal.containsKey(id) && portal.get(id).containsAll(pas);
}
代码示例来源:origin: Discord4J/Discord4J
/**
* Determines if the given user has all of the required permissions.
* This method takes into account if the user is the owner of the guild.
*
* @param guild The guild the user belongs to.
* @param user The user who must have all of the required permissions.
* @param required The permissions the user must have.
* @return True if the user has all of the required permissions.
*/
public static boolean hasPermissions(IGuild guild, IUser user, EnumSet<Permissions> required) {
return user.getPermissionsForGuild(guild).containsAll(required);
}
代码示例来源:origin: MobiVM/robovm
@Override
public boolean containsAll(Collection<?> collection) {
if (collection.isEmpty()) {
return true;
}
if (collection instanceof MiniEnumSet) {
MiniEnumSet<?> set = (MiniEnumSet<?>) collection;
long setBits = set.bits;
return isValidType(set.elementClass) && ((bits & setBits) == setBits);
}
return !(collection instanceof EnumSet) && super.containsAll(collection);
}
代码示例来源:origin: owlcs/owlapi
/**
* @param l language to check
* @return true if l is sufficient to express the ontology, i.e., if all constructs found in the
* ontology are included in the language
*/
public boolean isWithin(Languages l) {
return l.components.containsAll(getOrderedConstructs());
}
内容来源于网络,如有侵权,请联系作者删除!