/** * Mask the actions. (And operation) * @param actions the acl mask */ public void mask(AclActions actions) { mActions.and(actions.mActions); }
void intersect( BitSet set, boolean inverse ) { if ( inverse ) { candidates.andNot( set ); } else { candidates.and( set ); } checkEmpty(); }
/** Clear a {@link BitSet}. */ public static void clear(BitSet bitSet_) { bitSet_.and(EMPTY_BITSET); }
d.and(pred.getDoms());
@Override public void and(Filter filter) { if(filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) { throw new IllegalArgumentException("filters cannot be and-ed"); } this.bits.and(((BloomFilter) filter).bits); }
/** * Bitwise AND together two BitSets. * * @param left a BitSet * @param right another BitSet to bitwise AND * @return the bitwise AND of both BitSets * @since 1.5.0 */ public static BitSet and(BitSet left, BitSet right) { BitSet result = (BitSet) left.clone(); result.and(right); return result; }
private boolean checkAllTypesShouldBePresent(BitSet types) { // Bitset method subset is missing "filterTypes.isSubset(types)" // reset previous evaluation // evalFilterTypes.clear(); // not needed same as or() evalFilterTypes.or(filterTypes); // evaluate bit intersection and check if filterTypes contained as set in types evalFilterTypes.and(types); if(!evalFilterTypes.equals(filterTypes)) { return false; } return true; }
public void and(MutableBitmap mutableBitmap) { if (mutableBitmap instanceof WrappedBitSetBitmap) { WrappedBitSetBitmap bitSet = (WrappedBitSetBitmap) mutableBitmap; this.bitmap.and(bitSet.bitmap); } else { throw new IAE( "Unknown class type: %s expected %s", mutableBitmap.getClass().getCanonicalName(), WrappedBitSetBitmap.class.getCanonicalName() ); } }
@GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); }
public boolean hasTopic(Topic topic) { BitSet m = new BloomFilter(topic).mask; BitSet m1 = (BitSet) m.clone(); m1.and(mask); return m1.equals(m); }
BitSet bs1 = new BitSet(); bs1.set(2); bs1.set(5); bs1.set(7); bs1.set(8); BitSet bs2 = new BitSet(); bs2.set(2); bs2.set(7); bs2.set(9); bs1.and(bs2); // Prints {2, 7} System.out.println(bs1);
@GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); }
/** * Called to coalesce a successor's usage into the current BB. Important: This should be called * before live variable analysis begins, because we don't bother merging this.in or this.born. */ void absorb(Usage succ) { BitSet b = (BitSet) this.def.clone(); b.flip(0, nLocals); b.and(succ.use); this.use.or(b); this.def.or(succ.def); }
@GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); }
@Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); }
@GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); }
/** * Returns the set of live states. A state is "live" if an accept state is * reachable from it and if it is reachable from the initial state. */ private static BitSet getLiveStates(Automaton a) { BitSet live = getLiveStatesFromInitial(a); live.and(getLiveStatesToAccept(a)); return live; }
public static BlockNode getPathCross(MethodNode mth, BlockNode b1, BlockNode b2) { if (b1 == null || b2 == null) { return null; } BitSet b = new BitSet(); b.or(b1.getDomFrontier()); b.and(b2.getDomFrontier()); b.clear(b1.getId()); b.clear(b2.getId()); if (b.cardinality() == 1) { BlockNode end = mth.getBasicBlocks().get(b.nextSetBit(0)); if (isPathExists(b1, end) && isPathExists(b2, end)) { return end; } } if (isPathExists(b1, b2)) { return b2; } if (isPathExists(b2, b1)) { return b1; } return null; }
@Override public void intersection(FlowSet<T> otherFlow, FlowSet<T> destFlow) { if (sameType(otherFlow) && sameType(destFlow)) { ArrayPackedSet<T> other = (ArrayPackedSet<T>) otherFlow; ArrayPackedSet<T> dest = (ArrayPackedSet<T>) destFlow; copyBitSet(dest).and(other.bits); } else { super.intersection(otherFlow, destFlow); } }
@Override public void meetInto(BitSet fact, Edge edge, BitSet result) throws DataflowAnalysisException { if (!edgeChooser.choose(edge)) { return; } if (isTop(fact)) { return; } else if (isTop(result)) { copy(fact, result); } else { // Meet is intersection result.and(fact); } }