Java Code Examples for java.util.SortedSet.addAll()

The following are Jave code examples for showing how to use addAll() of the java.util.SortedSet class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: microbean-helm   File: ChartRepository.java   View Source Code Vote up 6 votes
/**
 * Performs a deep copy of the supplied {@link Map} such that the
 * {@link SortedMap} returned has copies of the supplied {@link
 * Map}'s {@linkplain Map#values() values}.
 *
 * <p>This method may return {@code null} if {@code source} is
 * {@code null}.</p>
 *
 * <p>The {@link SortedMap} returned by this method is
 * mutable.</p>
 *
 * @param source the {@link Map} to copy; may be {@code null} in
 * which case {@code null} will be returned
 *
 * @return a mutable {@link SortedMap}, or {@code null}
 */
private static final SortedMap<String, SortedSet<Entry>> deepCopy(final Map<? extends String, ? extends SortedSet<Entry>> source) {
  final SortedMap<String, SortedSet<Entry>> returnValue;
  if (source == null) {
    returnValue = null;
  } else if (source.isEmpty()) {
    returnValue = Collections.emptySortedMap();
  } else {
    returnValue = new TreeMap<>();
    final Collection<? extends Map.Entry<? extends String, ? extends SortedSet<Entry>>> entrySet = source.entrySet();
    if (entrySet != null && !entrySet.isEmpty()) {
      for (final Map.Entry<? extends String, ? extends SortedSet<Entry>> entry : entrySet) {
        final String key = entry.getKey();
        final SortedSet<Entry> value = entry.getValue();
        if (value == null) {
          returnValue.put(key, null);
        } else {
          final SortedSet<Entry> newValue = new TreeSet<>(value.comparator());
          newValue.addAll(value);
          returnValue.put(key, newValue);
        }
      }
    }
  }
  return returnValue;
}
 
Example 2
Project: incubator-netbeans   File: SingleModuleProperties.java   View Source Code Vote up 6 votes
String[] getAllTokens() {
    if (allTokens == null) {
        try {
            SortedSet<String> provTokens = new TreeSet<String>();
            provTokens.addAll(Arrays.asList(IDE_TOKENS));
            for (ModuleEntry me : getModuleList().getAllEntries()) {
                provTokens.addAll(Arrays.asList(me.getProvidedTokens()));
            }
            String[] result = new String[provTokens.size()];
            return provTokens.toArray(result);
        } catch (IOException e) {
            allTokens = new String[0];
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
        }
    }
    return allTokens;
}
 
Example 3
Project: lams   File: AuthoringAction.java   View Source Code Vote up 6 votes
/**
    * Ajax call, remove the given answer.
    *
    * @param mapping
    * @param form
    * @param request
    * @param response
    * @return
    */
   private ActionForward removeAnswer(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) {

SortedSet<ScratchieAnswer> answerList = getAnswersFromRequest(request, false);

int answerIndex = NumberUtils.toInt(request.getParameter(ScratchieConstants.PARAM_ANSWER_INDEX), -1);
if (answerIndex != -1) {
    List<ScratchieAnswer> rList = new ArrayList<ScratchieAnswer>(answerList);
    rList.remove(answerIndex);
    answerList.clear();
    answerList.addAll(rList);
}

request.setAttribute(ScratchieConstants.ATTR_ANSWER_LIST, answerList);
request.setAttribute(AttributeNames.PARAM_CONTENT_FOLDER_ID,
	WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID));
return mapping.findForward(ScratchieConstants.SUCCESS);
   }
 
Example 4
Project: incubator-netbeans   File: ClasspathPanel.java   View Source Code Vote up 6 votes
private void refreshJavaPlatforms() {
    SortedSet<JavaPlatform> platforms = new TreeSet<JavaPlatform>(new Comparator<JavaPlatform>() {
        Collator COLL = Collator.getInstance();
        public int compare(JavaPlatform p1, JavaPlatform p2) {
            int res = COLL.compare(p1.getDisplayName(), p2.getDisplayName());
            if (res != 0) {
                return res;
            } else {
                return System.identityHashCode(p1) - System.identityHashCode(p2);
            }
        }
    });
    platforms.addAll(Arrays.asList(JavaPlatformManager.getDefault().getInstalledPlatforms()));
    javaPlatform.setModel(new DefaultComboBoxModel(platforms.toArray(new JavaPlatform[platforms.size()])));
    JavaPlatform pf = jdkConf.getSelectedPlatform();
    if (pf == null) {
        pf = JavaPlatformManager.getDefault().getDefaultPlatform();
    }
    javaPlatform.setSelectedItem(pf);
}
 
Example 5
Project: lams   File: AuthoringAction.java   View Source Code Vote up 6 votes
/**
    * Remove daco question from HttpSession list and update page display. As authoring rule, all persist only happen
    * when user
    * submit whole page. So this remove is just impact HttpSession values.
    * 
    * @param mapping
    * @param form
    * @param request
    * @param response
    * @return
    */
   protected ActionForward removeQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request) {

// get back sessionMAP
String sessionMapID = WebUtil.readStrParam(request, DacoConstants.ATTR_SESSION_MAP_ID);
SessionMap<String, Object> sessionMap = (SessionMap<String, Object>) request.getSession().getAttribute(sessionMapID);

int questionIndex = NumberUtils.stringToInt(request.getParameter(DacoConstants.PARAM_QUESTION_INDEX), -1);
if (questionIndex != -1) {
    SortedSet<DacoQuestion> questionSet = getQuestionList(sessionMap);
    List<DacoQuestion> questionList = new ArrayList<DacoQuestion>(questionSet);
    DacoQuestion question = questionList.remove(questionIndex);
    questionSet.clear();
    questionSet.addAll(questionList);
    // add to delList
    List deletedList = getDeletedDacoQuestionList(sessionMap);
    deletedList.add(question);
}

request.setAttribute(DacoConstants.ATTR_SESSION_MAP_ID, sessionMapID);
return mapping.findForward(DacoConstants.SUCCESS);
   }
 
Example 6
Project: lams   File: AuthoringAction.java   View Source Code Vote up 6 votes
/**
    * Ajax call, remove the given line of instruction of resource item.
    *
    * @param mapping
    * @param form
    * @param request
    * @param response
    * @return
    */
   private ActionForward removeItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) {

String sessionMapID = WebUtil.readStrParam(request, ScratchieConstants.ATTR_SESSION_MAP_ID);
request.setAttribute(ScratchieConstants.ATTR_SESSION_MAP_ID, sessionMapID);
SessionMap<String, Object> sessionMap = (SessionMap<String, Object>) request.getSession()
	.getAttribute(sessionMapID);
SortedSet<ScratchieItem> itemList = getItemList(sessionMap);

int itemIndex = NumberUtils.toInt(request.getParameter(ScratchieConstants.PARAM_ITEM_INDEX), -1);
if (itemIndex != -1) {
    List<ScratchieItem> rList = new ArrayList<ScratchieItem>(itemList);
    ScratchieItem item = rList.remove(itemIndex);
    itemList.clear();
    itemList.addAll(rList);

    // add to delList
    List<ScratchieItem> delList = getDeletedItemList(sessionMap);
    delList.add(item);
}

request.setAttribute(ScratchieConstants.ATTR_ITEM_LIST, itemList);
return mapping.findForward(ScratchieConstants.SUCCESS);
   }
 
Example 7
Project: kafka-0.11.0.0-src-with-comment   File: RoundRobinAssignor.java   View Source Code Vote up 5 votes
public List<TopicPartition> allPartitionsSorted(Map<String, Integer> partitionsPerTopic,
                                                Map<String, Subscription> subscriptions) {
    SortedSet<String> topics = new TreeSet<>();
    for (Subscription subscription : subscriptions.values())
        topics.addAll(subscription.topics());

    List<TopicPartition> allPartitions = new ArrayList<>();
    for (String topic : topics) {
        Integer numPartitionsForTopic = partitionsPerTopic.get(topic);
        if (numPartitionsForTopic != null)
            allPartitions.addAll(AbstractPartitionAssignor.partitions(topic, numPartitionsForTopic));
    }
    return allPartitions;
}
 
Example 8
Project: lams   File: AuthoringAction.java   View Source Code Vote up 5 votes
private ActionForward switchItem(ActionMapping mapping, HttpServletRequest request, boolean up) {
// get back sessionMAP
String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID);
SessionMap<String, Object> sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapID);

int itemIdx = NumberUtils.stringToInt(request.getParameter(KalturaConstants.PARAM_ITEM_INDEX), -1);
if (itemIdx != -1) {
    SortedSet<KalturaItem> kalturaList = getItemList(sessionMap);
    List<KalturaItem> rList = new ArrayList<KalturaItem>(kalturaList);
    // get current and the target item, and switch their sequnece
    KalturaItem item = rList.get(itemIdx);
    KalturaItem repItem;
    if (up) {
	repItem = rList.get(--itemIdx);
    } else {
	repItem = rList.get(++itemIdx);
    }
    int upSeqId = repItem.getSequenceId();
    repItem.setSequenceId(item.getSequenceId());
    item.setSequenceId(upSeqId);

    // put back list, it will be sorted again
    kalturaList.clear();
    kalturaList.addAll(rList);
}

return mapping.findForward(KalturaConstants.ITEM_LIST);
   }
 
Example 9
Project: scott-eu   File: ServiceProviderCatalogSingleton.java   View Source Code Vote up 5 votes
public static void deregisterServiceProvider(final String serviceProviderId)
{
    synchronized(serviceProviders)
    {
        final ServiceProvider deregisteredServiceProvider =
            serviceProviders.remove(serviceProviderIdentifier(serviceProviderId));

        if (deregisteredServiceProvider != null)
        {
            final SortedSet<URI> remainingDomains = new TreeSet<URI>();

            for (final ServiceProvider remainingServiceProvider : serviceProviders.values())
            {
                remainingDomains.addAll(getServiceProviderDomains(remainingServiceProvider));
            }

            final SortedSet<URI> removedServiceProviderDomains = getServiceProviderDomains(deregisteredServiceProvider);

            removedServiceProviderDomains.removeAll(remainingDomains);
            serviceProviderCatalog.removeDomains(removedServiceProviderDomains);
            serviceProviderCatalog.removeServiceProvider(deregisteredServiceProvider);
        }
        else
        {
            throw new WebApplicationException(Status.NOT_FOUND);
        }
    }
}
 
Example 10
Project: lams   File: AuthoringAction.java   View Source Code Vote up 5 votes
/**
    * Remove taskList item from HttpSession list and update page display. As authoring rule, all persist only happen
    * when user submit whole page. So this remove is just impact HttpSession values.
    *
    * @param mapping
    * @param form
    * @param request
    * @param response
    * @return
    */
   private ActionForward removeItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) {

// get back sessionMAP
String sessionMapID = WebUtil.readStrParam(request, TaskListConstants.ATTR_SESSION_MAP_ID);
SessionMap<String, Object> sessionMap = (SessionMap<String, Object>) request.getSession().getAttribute(sessionMapID);

int itemIdx = NumberUtils.stringToInt(request.getParameter(TaskListConstants.PARAM_ITEM_INDEX), -1);
if (itemIdx != -1) {
    SortedSet<TaskListItem> taskListList = getTaskListItemList(sessionMap);
    List<TaskListItem> rList = new ArrayList<TaskListItem>(taskListList);
    TaskListItem item = rList.remove(itemIdx);
    taskListList.clear();
    taskListList.addAll(rList);
    // add to delList
    List delList = getDeletedTaskListItemList(sessionMap);
    delList.add(item);

    // delete tasklistitems that still may be contained in Conditions
    SortedSet<TaskListCondition> conditionList = getTaskListConditionList(sessionMap);
    for (TaskListCondition condition : conditionList) {
	Set<TaskListItem> itemList = condition.getTaskListItems();
	if (itemList.contains(item)) {
	    itemList.remove(item);
	}
    }

}

request.setAttribute(TaskListConstants.ATTR_SESSION_MAP_ID, sessionMapID);
return mapping.findForward(TaskListConstants.SUCCESS);
   }
 
Example 11
Project: MooProject   File: CandidateCompleter.java   View Source Code Vote up 5 votes
@Override
public int complete(String buffer, int cursor, List<CharSequence> candidates) {
    // buffer could be null
    Preconditions.checkNotNull(candidates);
    SortedSet<String> strings = new TreeSet<>();

    TabCompleteEvent event = new TabCompleteEvent(buffer);
    EventExecutor.getInstance().execute(event);
    if(!event.isCancelled()) {
        List<String> l = event.getSuggestions();
        if(l != null) strings.addAll(l);
    }

    String currentBuffer = event.getCurrentBuffer();
    String add = event.getBeforeBuffer();

    if(currentBuffer == null) {
        for(String string : strings) {
            candidates.add(add + string);
        }
    }
    else {
        for(String match : strings.tailSet(currentBuffer)) {
            if(!match.startsWith(currentBuffer)) {
                break;
            }
            candidates.add(add + match);
        }
    }

    return candidates.isEmpty() ? -1 : 0;
}
 
Example 12
Project: sstore-soft   File: HistogramUtil.java   View Source Code Vote up 5 votes
/**
 * Returns the list of values sorted in descending order by cardinality
 * @param h
 * @return
 */
public static <X> Collection<X> sortedValues(final Histogram<X> h) {
    SortedSet<X> sorted = new TreeSet<X>(new Comparator<X>() {
        public int compare(final X item0, final X item1) {
            final Long v0 = h.get(item0);
            final Long v1 = h.get(item1);
            if (v0.equals(v1))
                return (-1);
            return (v1.compareTo(v0));
          }
    });
    sorted.addAll(h.values());
    return (sorted);
}
 
Example 13
Project: athena   File: OchSignalTest.java   View Source Code Vote up 5 votes
@Test
public void testToFlexgrid50Plus1() {
    OchSignal input = newDwdmSlot(CHL_50GHZ, 1);
    SortedSet<OchSignal> expected = newOchSignalTreeSet();
    // Note: 8 = 50Ghz / 6.25Ghz
    expected.addAll(ImmutableList.of(
                newFlexGridSlot(8 - 3), newFlexGridSlot(8 - 1),
                newFlexGridSlot(8 + 1), newFlexGridSlot(8 + 3)));

    SortedSet<OchSignal> flexGrid = OchSignal.toFlexGrid(input);

    assertEquals(expected, flexGrid);
}
 
Example 14
Project: athena   File: OchSignalTest.java   View Source Code Vote up 5 votes
@Test
public void testToFlexgrid50minus1() {
    OchSignal input = newDwdmSlot(CHL_50GHZ, -1);
    SortedSet<OchSignal> expected = newOchSignalTreeSet();
    // Note: 8 = 50Ghz / 6.25Ghz
    expected.addAll(ImmutableList.of(
                newFlexGridSlot(-8 - 3), newFlexGridSlot(-8 - 1),
                newFlexGridSlot(-8 + 1), newFlexGridSlot(-8 + 3)));

    SortedSet<OchSignal> flexGrid = OchSignal.toFlexGrid(input);

    assertEquals(expected, flexGrid);
}
 
Example 15
Project: ralasafe   File: BackupManagerImpl.java   View Source Code Vote up 4 votes
public Collection getBackups() {
	Collection backups = selector.select(new SelectCondition(), null);
	SortedSet result = Collections.synchronizedSortedSet(new TreeSet(comp));
	result.addAll(backups);
	return result;
}
 
Example 16
Project: alfresco-core   File: TransactionSupportUtil.java   View Source Code Vote up 4 votes
/**
 * Pre-commit cleanup.
 * <p>
 * Ensures that the session transaction listeners are property executed.
 * 
 * The Lucene indexes are then prepared.
 */
@Override
public void beforeCommit(boolean readOnly)
{
    if (logger.isDebugEnabled())
    {
        logger.debug("Before commit " + (readOnly ? "read-only" : "" ) + this);
    }
    // get the txn ID
    TransactionSynchronizationImpl synch = (TransactionSynchronizationImpl)
            TransactionSynchronizationManager.getResource(RESOURCE_KEY_TXN_SYNCH);
    if (synch == null)
    {
        throw new AlfrescoRuntimeException("No synchronization bound to thread");
    }
    
    logger.trace("Before Prepare - level 0");

    // Run the priority 0 (normal) listeners
    // These are still considered part of the transaction so are executed here
    doBeforeCommit(readOnly);
    
    // Now run the > 0 listeners beforeCommit
    Set<Integer> priorities = priorityLookup.keySet();
    
    SortedSet<Integer> sortedPriorities = new ConcurrentSkipListSet<Integer>(FORWARD_INTEGER_ORDER);
    sortedPriorities.addAll(priorities);
    sortedPriorities.remove(0);    //  already done level 0 above
    
    if(logger.isDebugEnabled())
    {
        logger.debug("Before Prepare priorities:" + sortedPriorities);
    }
    for(Integer priority : sortedPriorities)
    {
        Set<TransactionListener> listeners = priorityLookup.get(priority);
        
        for(TransactionListener listener : listeners)
        {
            listener.beforeCommit(readOnly);
        }
    }
    if(logger.isDebugEnabled())
    {
        logger.debug("Prepared");
    }
}
 
Example 17
Project: alfresco-core   File: TransactionSupportUtil.java   View Source Code Vote up 4 votes
@Override
public void afterCompletion(int status)
{
    String statusStr = "unknown";
    switch (status)
    {
        case TransactionSynchronization.STATUS_COMMITTED:
            statusStr = "committed";
            break;
        case TransactionSynchronization.STATUS_ROLLED_BACK:
            statusStr = "rolled-back";
            break;
        default:
    }
    if (logger.isDebugEnabled())
    {
        logger.debug("After completion (" + statusStr + "): " + this);
    }
    
    // Force any queries for read-write state to return TXN_READ_ONLY
    // This will be cleared with the synchronization, so we don't need to clear it out
    TransactionSupportUtil.bindResource(RESOURCE_KEY_TXN_COMPLETING, Boolean.TRUE);
    
    Set<Integer> priorities = priorityLookup.keySet();

    SortedSet<Integer> sortedPriorities = new ConcurrentSkipListSet<Integer>(REVERSE_INTEGER_ORDER);
    sortedPriorities.addAll(priorities);
 
    // Need to run these in reverse order cache,lucene,listeners
    for(Integer priority : sortedPriorities)
    {
        Set<TransactionListener> listeners = new HashSet<TransactionListener>(priorityLookup.get(priority));

        for(TransactionListener listener : listeners) 
        {
            try
            {
                if (status  == TransactionSynchronization.STATUS_COMMITTED)
                {
                    listener.afterCommit();
                }
                else
                {
                    listener.afterRollback();
                }
            }
            catch (RuntimeException e)
            {
                logger.error("After completion (" + statusStr + ") TransactionalCache exception", e);
            }
        }
    }
    if(logger.isDebugEnabled())
    {
        logger.debug("After Completion: DONE");
    }
    
    
    // clear the thread's registrations and synchronizations
    TransactionSupportUtil.clearSynchronization();
}
 
Example 18
Project: lazycat   File: HostConfig.java   View Source Code Vote up 4 votes
/**
 * Check for old versions of applications using parallel deployment that are
 * now unused (have no active sessions) and undeploy any that are found.
 */
public synchronized void checkUndeploy() {
	// Need ordered set of names
	SortedSet<String> sortedAppNames = new TreeSet<String>();
	sortedAppNames.addAll(deployed.keySet());

	if (sortedAppNames.size() < 2) {
		return;
	}
	Iterator<String> iter = sortedAppNames.iterator();

	ContextName previous = new ContextName(iter.next(), false);
	do {
		ContextName current = new ContextName(iter.next(), false);

		if (current.getPath().equals(previous.getPath())) {
			// Current and previous are same path - current will always
			// be a later version
			Context previousContext = (Context) host.findChild(previous.getName());
			Context currentContext = (Context) host.findChild(current.getName());
			if (previousContext != null && currentContext != null && currentContext.getState().isAvailable()
					&& !isServiced(previous.getName())) {
				Manager manager = previousContext.getManager();
				if (manager != null) {
					int sessionCount;
					if (manager instanceof DistributedManager) {
						sessionCount = ((DistributedManager) manager).getActiveSessionsFull();
					} else {
						sessionCount = manager.getActiveSessions();
					}
					if (sessionCount == 0) {
						if (log.isInfoEnabled()) {
							log.info(sm.getString("hostConfig.undeployVersion", previous.getName()));
						}
						DeployedApplication app = deployed.get(previous.getName());
						String[] resources = app.redeployResources.keySet().toArray(new String[0]);
						// Version is unused - undeploy it completely
						// The -1 is a 'trick' to ensure all redeploy
						// resources are removed
						undeploy(app);
						deleteRedeployResources(app, resources, -1, true);
					}
				}
			}
		}
		previous = current;
	} while (iter.hasNext());
}
 
Example 19
Project: tomcat7   File: HostConfig.java   View Source Code Vote up 4 votes
/**
 * Check for old versions of applications using parallel deployment that are
 * now unused (have no active sessions) and undeploy any that are found.
 */
public synchronized void checkUndeploy() {
    // Need ordered set of names
    SortedSet<String> sortedAppNames = new TreeSet<String>();
    sortedAppNames.addAll(deployed.keySet());

    if (sortedAppNames.size() < 2) {
        return;
    }
    Iterator<String> iter = sortedAppNames.iterator();

    ContextName previous = new ContextName(iter.next(), false);
    do {
        ContextName current = new ContextName(iter.next(), false);

        if (current.getPath().equals(previous.getPath())) {
            // Current and previous are same path - current will always
            // be a later version
            Context previousContext = (Context) host.findChild(previous.getName());
            Context currentContext = (Context) host.findChild(current.getName());
            if (previousContext != null && currentContext != null &&
                    currentContext.getState().isAvailable() &&
                    !isServiced(previous.getName())) {
                Manager manager = previousContext.getManager();
                if (manager != null) {
                    int sessionCount;
                    if (manager instanceof DistributedManager) {
                        sessionCount = ((DistributedManager) manager).getActiveSessionsFull();
                    } else {
                        sessionCount = manager.getActiveSessions();
                    }
                    if (sessionCount == 0) {
                        if (log.isInfoEnabled()) {
                            log.info(sm.getString(
                                    "hostConfig.undeployVersion", previous.getName()));
                        }
                        DeployedApplication app = deployed.get(previous.getName());
                        String[] resources = app.redeployResources.keySet().toArray(new String[0]);
                        // Version is unused - undeploy it completely
                        // The -1 is a 'trick' to ensure all redeploy
                        // resources are removed
                        undeploy(app);
                        deleteRedeployResources(app, resources, -1, true);
                    }
                }
            }
        }
        previous = current;
    } while (iter.hasNext());
}
 
Example 20
Project: Pogamut3   File: DependencyStatusSets.java   View Source Code Vote up 4 votes
public String getOutput(boolean outputAbsoluteArtifactFilename, boolean outputScope )
{
    StringBuffer sb = new StringBuffer();
    sb.append( "\n" );
    sb.append( "The following files have been resolved:\n" );
    if ( this.resolvedDependencies == null || this.resolvedDependencies.isEmpty() )
    {
        sb.append( "   none\n" );
    }
    else
    {
        for ( Iterator i = resolvedDependencies.iterator(); i.hasNext(); )
        {
            Artifact artifact = (Artifact) i.next();
            String artifactFilename = null;
            if ( outputAbsoluteArtifactFilename )
            {
                try
                {
                    // we want to print the absolute file name here
                    artifactFilename = artifact.getFile().getAbsoluteFile().getPath();
                }
                catch ( NullPointerException e )
                {
                    // ignore the null pointer, we'll output a null string
                    artifactFilename = null;
                }
            }
            
            String id = outputScope ? artifact.toString() : artifact.getId();
            
            sb.append( "   " + id + ( outputAbsoluteArtifactFilename ? ":" + artifactFilename : "" ) +"\n");
        }
    }

    if ( this.skippedDependencies != null && !this.skippedDependencies.isEmpty() )
    {
        sb.append( "\n" );
        sb.append( "The following files were skipped:\n" );
        SortedSet sortedSkippedDependencies = new TreeSet();
        sortedSkippedDependencies.addAll( this.skippedDependencies );
        for ( Iterator i = sortedSkippedDependencies.iterator(); i.hasNext(); )
        {
            sb.append( "   " + ( (Artifact) i.next() ).getId()+"\n" );
        }
    }

    if ( this.unResolvedDependencies != null && !this.unResolvedDependencies.isEmpty() )
    {
        sb.append( "\n" );
        sb.append( "The following files have NOT been resolved:\n" );
        SortedSet sortedUnResolvedDependencies = new TreeSet();
        sortedUnResolvedDependencies.addAll( this.unResolvedDependencies );
        for ( Iterator i = sortedUnResolvedDependencies.iterator(); i.hasNext(); )
        {
            sb.append( "   " + ( (Artifact) i.next() ).getId()+"\n" );
        }
    }
    sb.append("\n");

    return sb.toString();
}