var set = new StringSet(); set.add("foo"); set.add("bar"); alert(set.contains("foo")); // true alert(set.contains("baz")); // false set.values(); // ["foo", "bar"], though not necessarily in that order set.remove("foo"); set.values(); // ["bar"]
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
void tagAsStructurallyChanged() { this.previousStructuralBuildTime = this.lastStructuralBuildTime; this.structurallyChangedTypes = new StringSet(7); this.lastStructuralBuildTime = computeStructuralBuildTime(this.previousStructuralBuildTime); }
/** * Adds the given type name to the collection of structurally changed types. * Does nothing if <code>null</code> is passed in as the type name. * * @param typename */ public void recordStructuralChange(String typename) { if (typename == null) { return; } if (this.structualChanges == null) { this.structualChanges = new StringSet(16); } this.structualChanges.add(typename.replace('/', '.')); }
private void rehash() { StringSet newSet = new StringSet(this.elementSize * 2); // double the number of expected elements String current; for (int i = this.values.length; --i >= 0;) if ((current = this.values[i]) != null) newSet.add(current); this.values = newSet.values; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; }
/** * Adds the given type name to the collection of removed types. Does nothing * if <code>null</code> is passed in as the type name. * * @param typename */ public void recordRemovedType(String typename) { if (typename == null) { return; } if (this.removedTypes == null) { this.removedTypes = new StringSet(16); } this.removedTypes.add(typename.replace('/', '.')); }
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException { if (sourceFile == null || problems == null || problems.length == 0) return; for (int i = problems.length; --i >= 0;) { CategorizedProblem problem = problems[i]; if (problem != null && problem.getID() == IProblem.UndefinedType) { if (this.typeLocatorsWithUndefinedTypes == null) this.typeLocatorsWithUndefinedTypes = new StringSet(3); this.typeLocatorsWithUndefinedTypes.add(sourceFile.typeLocator()); break; } } super.storeProblemsFor(sourceFile, problems); }
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException { if (sourceFile == null || problems == null || problems.length == 0) return; for (int i = problems.length; --i >= 0;) { CategorizedProblem problem = problems[i]; if (problem != null && problem.getID() == IProblem.UndefinedType) { if (this.typeLocatorsWithUndefinedTypes == null) this.typeLocatorsWithUndefinedTypes = new StringSet(3); this.typeLocatorsWithUndefinedTypes.add(sourceFile.typeLocator()); break; } } super.storeProblemsFor(sourceFile, problems); }
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException { if (sourceFile == null || problems == null || problems.length == 0) return; for (int i = problems.length; --i >= 0;) { CategorizedProblem problem = problems[i]; if (problem != null && problem.getID() == IProblem.UndefinedType) { if (this.typeLocatorsWithUndefinedTypes == null) this.typeLocatorsWithUndefinedTypes = new StringSet(3); this.typeLocatorsWithUndefinedTypes.add(sourceFile.typeLocator()); break; } } super.storeProblemsFor(sourceFile, problems); }
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException { if (sourceFile == null || problems == null || problems.length == 0) return; for (int i = problems.length; --i >= 0;) { CategorizedProblem problem = problems[i]; if (problem != null && problem.getID() == IProblem.UndefinedType) { if (this.typeLocatorsWithUndefinedTypes == null) this.typeLocatorsWithUndefinedTypes = new StringSet(3); this.typeLocatorsWithUndefinedTypes.add(sourceFile.typeLocator()); break; } } super.storeProblemsFor(sourceFile, problems); }
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException { if (sourceFile == null || problems == null || problems.length == 0) return; for (int i = problems.length; --i >= 0;) { CategorizedProblem problem = problems[i]; if (problem != null && problem.getID() == IProblem.UndefinedType) { if (this.typeLocatorsWithUndefinedTypes == null) this.typeLocatorsWithUndefinedTypes = new StringSet(3); this.typeLocatorsWithUndefinedTypes.add(sourceFile.typeLocator()); break; } } super.storeProblemsFor(sourceFile, problems); }