Java Code Examples for com.helger.commons.collection.impl.ICommonsList#getClone()

The following examples show how to use com.helger.commons.collection.impl.ICommonsList#getClone() . 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: XMLDebug.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nullable
@ReturnsMutableCopy
public static ICommonsList <String> getAllSupportedFeatures (@Nonnull final EXMLDOMFeatureVersion eFeatureVersion)
{
  final ICommonsList <String> ret = s_aSupportedFeatures.get (eFeatureVersion);
  return ret == null ? null : ret.getClone ();
}
 
Example 2
Source File: MimeTypeInfoManager.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all infos associated with the passed mime type.
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return <code>null</code> if a <code>null</code> mime type was passed or
 *         the passed mime type is unknown.
 */
@Nullable
@ReturnsMutableCopy
public ICommonsList <MimeTypeInfo> getAllInfosOfMimeType (@Nullable final IMimeType aMimeType)
{
  if (aMimeType == null)
    return null;

  final ICommonsList <MimeTypeInfo> ret = m_aRWLock.readLockedGet ( () -> m_aMapMimeType.get (aMimeType));

  // Create a copy if present
  return ret == null ? null : ret.getClone ();
}
 
Example 3
Source File: HttpHeaderMap.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
/**
 * Get all header values of a certain header name.
 *
 * @param sName
 *        The name to be searched.
 * @return The list with all matching values. Never <code>null</code> but
 *         maybe empty.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsList <String> getAllHeaderValues (@Nullable final String sName)
{
  if (StringHelper.hasText (sName))
  {
    final ICommonsList <String> aValues = _getHeaderList (sName);
    if (aValues != null)
      return aValues.getClone ();
  }
  return new CommonsArrayList <> ();
}
 
Example 4
Source File: ParsedCmdLine.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nullable
@ReturnsMutableObject
public ICommonsList <String> values (@Nonnull final IOptionBase aOption)
{
  final ICommonsList <String> aValues = _find (aOption);
  return aValues == null ? null : aValues.getClone ();
}
 
Example 5
Source File: ParsedCmdLine.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nullable
@ReturnsMutableObject
public ICommonsList <String> values (@Nonnull final String sOption)
{
  final ICommonsList <String> aValues = _find (sOption);
  return aValues == null ? null : aValues.getClone ();
}