Package java.util

Examples of java.util.LinkedHashSet.retainAll()


            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here


            Set declaredArtifacts = buildDeclaredArtifacts( project );
           
            Set usedArtifacts = buildUsedArtifacts( artifactClassMap, dependencyClasses );
           
            Set usedDeclaredArtifacts = new LinkedHashSet( declaredArtifacts );
            usedDeclaredArtifacts.retainAll( usedArtifacts );

            Set usedUndeclaredArtifacts = new LinkedHashSet( usedArtifacts );
            usedUndeclaredArtifacts = removeAll( usedUndeclaredArtifacts, declaredArtifacts );

            Set unusedDeclaredArtifacts = new LinkedHashSet( declaredArtifacts );
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

      final IJavaElement elem = (IJavaElement) it.next();
      if (elem.getElementType() == IJavaElement.FIELD)
        ret.add(elem);
    }

    ret.retainAll(this.fieldsToRefactor);
    return ret;
  }

  private String getFullyQualifiedName(IJavaElement elem) {
    // Get the associated set.
View Full Code Here

    final Collection ret = new LinkedHashSet(candidateSets);

    // make sure the values are distinct.
    final Collection distinctEnumerizableElementSets = Util
        .getDistinctSets(candidateSets);
    ret.retainAll(distinctEnumerizableElementSets);

    // make sure the fields have a consistent visibility.
    final Collection consistentEnumerizableElementSets = Util
        .getConsistentlyVisibleSets(candidateSets);
    ret.retainAll(consistentEnumerizableElementSets);
View Full Code Here

    ret.retainAll(distinctEnumerizableElementSets);

    // make sure the fields have a consistent visibility.
    final Collection consistentEnumerizableElementSets = Util
        .getConsistentlyVisibleSets(candidateSets);
    ret.retainAll(consistentEnumerizableElementSets);

    // make sure the fields are named uniquely.
    final Collection uniquelyNamedEnumerizableElementSets = Util
        .getUniquelyNamedSets(candidateSets);
    ret.retainAll(uniquelyNamedEnumerizableElementSets);
View Full Code Here

    ret.retainAll(consistentEnumerizableElementSets);

    // make sure the fields are named uniquely.
    final Collection uniquelyNamedEnumerizableElementSets = Util
        .getUniquelyNamedSets(candidateSets);
    ret.retainAll(uniquelyNamedEnumerizableElementSets);

    return ret;
  }

  private final Collection constFields;
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.