public int size() { return aug_list.size(); }
@Override public int hashCode() { int code = 23 * size(); for (T t : this) { // use addition here to have hash code independent of order code += t.hashCode(); } return code; }
public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if ((o instanceof IterableSet) == false) { return false; } @SuppressWarnings("unchecked") IterableSet<T> other = (IterableSet<T>) o; if (size() != other.size()) { return false; } for (T t : this) { if (!other.contains(t)) { return false; } } return true; }
public boolean intersects(IterableSet<T> other) { if (other == null) { throw new IllegalArgumentException("Cannot set intersect an IterableSet with \"null\"."); } if (other.size() < size()) { for (T t : other) { if (contains(t)) { return true; } } } else { for (T t : this) { if (other.contains(t)) { return true; } } } return false; }
private int get_Priority() { if (priority == -1) { priority = 0; if (predecessors.size() == 1) { Iterator sit = successors.iterator(); while (sit.hasNext()) { int sucScore = ((SETBasicBlock) sit.next()).get_Priority(); if (sucScore > priority) { priority = sucScore; } } priority++; } } return priority; }
public IterableSet<T> intersection(IterableSet<T> other) { if (other == null) { throw new IllegalArgumentException("Cannot set intersect an IterableSet with \"null\"."); } IterableSet<T> c = new IterableSet<T>(); if (other.size() < size()) { for (T t : other) { if (contains(t)) { c.add(t); } } } else { for (T t : this) { if (other.contains(t)) { c.add(t); } } } return c; }
if (candidates.size() == 1) { return (AugmentedStmt) candidates.getFirst(); int current_reach_size = ((AugmentedStmt) candSuccMap.get(as)).get_Reachers().intersection(candidates).size(); throw new RuntimeException("Did not find a suitable candidate"); if (candidates.size() == 1) { return (AugmentedStmt) candidates.getFirst();
ExceptionNode[] ena = new ExceptionNode[enlist.size()]; Iterator<ExceptionNode> enlit = enlist.iterator(); for (int i = 0; enlit.hasNext(); i++) {
while (child.get_Predecessors().size() == 1) { if ((SETBasicBlock.get_SETBasicBlock(prev) != null) || (prev.get_Successors().size() != 1)) { break; while (child.get_Successors().size() == 1) { child = (SETNode) child.get_Successors().getFirst(); if ((SETBasicBlock.get_SETBasicBlock(child) != null) || (child.get_Predecessors().size() != 1)) { break;
if (entry_points.size() > 1) {
public boolean isSupersetOf( IterableSet other) { if (other == null) throw new IllegalArgumentException( "Cannot set compare an IterableSet with \"null\"."); if (size() < other.size()) return false; Iterator it = other.iterator(); while (it.hasNext()) if (contains( it.next()) == false) return false; return true; }
public boolean isSubsetOf( IterableSet other) { if (other == null) throw new IllegalArgumentException( "Cannot set compare an IterableSet with \"null\"."); if (size() > other.size()) return false; Iterator it = iterator(); while (it.hasNext()) if (other.contains( it.next()) == false) return false; return true; }
public boolean isSubsetOf( IterableSet other) { if (other == null) throw new IllegalArgumentException( "Cannot set compare an IterableSet with \"null\"."); if (size() > other.size()) return false; Iterator it = iterator(); while (it.hasNext()) if (other.contains( it.next()) == false) return false; return true; }
public boolean isSupersetOf( IterableSet other) { if (other == null) throw new IllegalArgumentException( "Cannot set compare an IterableSet with \"null\"."); if (size() < other.size()) return false; Iterator it = other.iterator(); while (it.hasNext()) if (contains( it.next()) == false) return false; return true; }