Code example for LinkedHashSet

Methods: addAll

0
    public Set<Object /* IInstallableUnit */> getMetadata(boolean primary) {
        return primary ? metadata : secondaryMetadata;
    } 
 
    public Set<Object /* IInstallableUnit */> getMetadata() {
        LinkedHashSet<Object> result = new LinkedHashSet<Object>();
        result.addAll(metadata);
        result.addAll(secondaryMetadata);
        return result;
    } 
 
    public void setMetadata(boolean primary, Collection<IInstallableUnit> units) {
        if (primary) {
            metadata = new LinkedHashSet<Object>(units);
        } else { 
            secondaryMetadata = new LinkedHashSet<Object>(units);
        } 
    } 
 
    public void setArtifacts(Collection<IArtifactDescriptor> artifacts) {
        this.artifacts = new LinkedHashSet<IArtifactDescriptor>(artifacts);