/** * Construct an instance with the given List of listeners. * * @param listeners * the initial List of SchedulerListeners to broadcast to. */ public BroadcastSchedulerListener (final Iterable <? extends ISchedulerListener> listeners) { m_aListeners.addAll (listeners); }
/** * Construct an instance with the given name, and List of listeners. * * @param name * the name of this instance * @param listeners * the initial List of TriggerListeners to broadcast to. */ public BroadcastTriggerListener (@Nonnull final String name, final Iterable <? extends ITriggerListener> listeners) { this (name); m_aListeners.addAll (listeners); }
public CSSExpressionMemberLineNames (@Nonnull final Iterable <? extends String> aMembers) { m_aMembers.addAll (aMembers); }
public PModeAddressList (@Nullable final Collection <String> aAddresses) { if (aAddresses != null) m_aAddresses.addAll (aAddresses); }
public CSSExpressionMemberMath (@Nonnull final Iterable <? extends ICSSExpressionMathMember> aMembers) { m_aMembers.addAll (aMembers); }
public JSAnonymousFunction (@Nullable final Iterable <? extends JSVar> aParams, @Nullable final JSBlock aBody) { if (aParams != null) m_aParams.addAll (aParams); m_aBody = aBody; }
public MailTransportError (@Nonnull final Throwable aThrowable, @Nullable final Iterable <? extends MailSendDetails> aDetails) { m_aThrowable = ValueEnforcer.notNull (aThrowable, "Throwable"); m_aDetails.addAll (aDetails); }
/** * Copy constructor * * @param aBase * The object to copy the settings from. May not be <code>null</code>. */ public CacheControlBuilder (@Nonnull final CacheControlBuilder aBase) { ValueEnforcer.notNull (aBase, "Base"); m_aMaxAgeSeconds = aBase.m_aMaxAgeSeconds; m_aSharedMaxAgeSeconds = aBase.m_aSharedMaxAgeSeconds; m_bPublic = aBase.m_bPublic; m_bPrivate = aBase.m_bPrivate; m_bNoCache = aBase.m_bNoCache; m_bNoStore = aBase.m_bNoStore; m_bNoTransform = aBase.m_bNoTransform; m_bMustRevalidate = aBase.m_bMustRevalidate; m_bProxyRevalidate = aBase.m_bProxyRevalidate; m_aExtensions.addAll (aBase.m_aExtensions); }
public JSAnonymousFunction (@Nullable final Iterable <? extends JSVar> aParams, @Nullable final IJSStatement aBody) { m_aParams.addAll (aParams); if (aBody != null) body ().add (aBody); }
private ICommonsList <ISchedulerListener> _buildSchedulerListenerList () { final ICommonsList <ISchedulerListener> allListeners = new CommonsArrayList <> (); allListeners.addAll (getListenerManager ().getSchedulerListeners ()); allListeners.addAll (getInternalSchedulerListeners ()); return allListeners; }
@Nonnull @ReturnsMutableCopy public ICommonsList <IFavorite> getAllFavorites () { final ICommonsList <IFavorite> ret = new CommonsArrayList <> (); for (final Map.Entry <String, ICommonsList <Favorite>> aEntry : m_aMap.entrySet ()) ret.addAll (aEntry.getValue ()); return ret; }
@Nonnull @ReturnsMutableCopy public ICommonsList <IAPIDescriptor> getAllDescriptors () { final ICommonsList <IAPIDescriptor> ret = new CommonsArrayList<> (); for (final ICommonsList <APIDescriptor> aList : m_aMap.values ()) ret.addAll (aList); return ret; }
@Nonnull @ReturnsMutableCopy public ICommonsList <SystemMigrationResult> getAllMigrationResultsFlattened () { final ICommonsList <SystemMigrationResult> ret = new CommonsArrayList <> (); m_aRWLock.readLocked ( () -> { for (final ICommonsList <SystemMigrationResult> aResults : m_aMap.values ()) ret.addAll (aResults); }); return ret; }
public IMicroNode next () { if (m_aOpen.isEmpty ()) throw new NoSuchElementException (); final IMicroNode ret = m_aOpen.remove (0); if (ret.hasChildren ()) m_aOpen.addAll (0, ret.getAllChildren ()); return ret; } }
@Nonnull @ReturnsMutableCopy public ICommonsList <IMicroElement> getAllChildElementsRecursive () { final ICommonsList <IMicroElement> ret = new CommonsArrayList <> (); _forAllChildElements (this, null, aChildElement -> { ret.add (aChildElement); ret.addAll (aChildElement.getAllChildElementsRecursive ()); }); return ret; }
public void addJobListener (final IJobListener jobListener, final List <IMatcher <JobKey>> matchers) { if (jobListener.getName () == null || jobListener.getName ().length () == 0) throw new IllegalArgumentException ("JobListener name cannot be empty."); synchronized (m_aGlobalJobListeners) { m_aGlobalJobListeners.put (jobListener.getName (), jobListener); final ICommonsList <IMatcher <JobKey>> matchersL = new CommonsArrayList <> (); if (matchers != null && matchers.size () > 0) matchersL.addAll (matchers); else matchersL.add (EverythingMatcher.allJobs ()); m_aGlobalJobListenersMatchers.put (jobListener.getName (), matchersL); } }
/** * Search the String {@code text} to locate all occurrences of the words * contained in {@code targetWords}, accounting for homoglyph substitution and * variations of case. * * @param text * text to be searched * @param aTargetWords * words to be located * @return a List containing the results of the search, if no matches were * found an empty list will be returned */ @Nonnull @ReturnsMutableCopy public ICommonsList <HomoglyphSearchResult> search (final String text, final Iterable <String> aTargetWords) { final ICommonsList <HomoglyphSearchResult> allResults = new CommonsArrayList <> (); final CodePoints textCodepoints = new CodePoints (text); for (final String sTargetWord : aTargetWords) allResults.addAll (_checkForWord (textCodepoints, new CodePoints (sTargetWord))); return allResults; }
@Nonnull @ReturnsMutableCopy @MustBeLocked (ELockType.WRITE) protected ICommonsList <FailedMailData> internalRemoveAll () { final ICommonsList <FailedMailData> aTempList = new CommonsArrayList <> (m_aMap.size ()); if (!m_aMap.isEmpty ()) { aTempList.addAll (m_aMap.values ()); m_aMap.clear (); } return aTempList; }