Java Code Examples for com.helger.commons.collection.impl.ICommonsOrderedSet#addAll()

The following examples show how to use com.helger.commons.collection.impl.ICommonsOrderedSet#addAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Graph.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllRelationIDs ()
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  for (final IMutableGraphNode aNode : m_aNodes.values ())
    ret.addAll (aNode.getAllRelationIDs ());
  return ret;
}
 
Example 2
Source File: DirectedGraphNode.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <IMutableDirectedGraphRelation> getAllRelations ()
{
  final ICommonsOrderedSet <IMutableDirectedGraphRelation> ret = new CommonsLinkedHashSet <> ();
  if (m_aIncoming != null)
    ret.addAll (m_aIncoming.values ());
  if (m_aOutgoing != null)
    ret.addAll (m_aOutgoing.values ());
  return ret;
}
 
Example 3
Source File: DirectedGraphNode.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllRelationIDs ()
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  if (m_aIncoming != null)
    ret.addAll (m_aIncoming.keySet ());
  if (m_aOutgoing != null)
    ret.addAll (m_aOutgoing.keySet ());
  return ret;
}
 
Example 4
Source File: GraphNode.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <IMutableGraphRelation> getAllRelations ()
{
  final ICommonsOrderedSet <IMutableGraphRelation> ret = new CommonsLinkedHashSet <> ();
  if (m_aRelations != null)
    ret.addAll (m_aRelations.values ());
  return ret;
}
 
Example 5
Source File: GraphNode.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllRelationIDs ()
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  if (m_aRelations != null)
    ret.addAll (m_aRelations.keySet ());
  return ret;
}
 
Example 6
Source File: DirectedGraph.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllRelationIDs ()
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  for (final IMutableDirectedGraphNode aNode : m_aNodes.values ())
    ret.addAll (aNode.getAllRelationIDs ());
  return ret;
}
 
Example 7
Source File: MimeTypeInfoManager.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all mime types that are associated to the specified filename extension.
 *
 * @param sExtension
 *        The filename extension to search. May not be <code>null</code>.
 * @return Never <code>null</code> but maybe empty set if no mime type is
 *         associated with the passed extension.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <IMimeType> getAllMimeTypesForExtension (@Nonnull final String sExtension)
{
  ValueEnforcer.notNull (sExtension, "Extension");

  final ICommonsOrderedSet <IMimeType> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfExtension (sExtension);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllMimeTypes ());
  return ret;
}
 
Example 8
Source File: MimeTypeInfoManager.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all mime types that are associated to the specified filename extension.
 *
 * @param sExtension
 *        The filename extension to search. May not be <code>null</code>.
 * @return Never <code>null</code> but maybe empty set if no mime type is
 *         associated with the passed extension.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllMimeTypeStringsForExtension (@Nonnull final String sExtension)
{
  ValueEnforcer.notNull (sExtension, "Extension");

  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfExtension (sExtension);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllMimeTypeStrings ());
  return ret;
}
 
Example 9
Source File: MimeTypeInfoManager.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all extensions associated to the specified mime type
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return Never <code>null</code> but empty set if no extensions are present.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllExtensionsOfMimeType (@Nullable final IMimeType aMimeType)
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllExtensions ());
  return ret;
}
 
Example 10
Source File: MimeTypeInfoManager.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all globs (=filename patterns) associated to the specified mime type
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return Never <code>null</code> but empty set if no globs are present.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllGlobsOfMimeType (@Nullable final IMimeType aMimeType)
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllGlobs ());
  return ret;
}