/** * Checks if a given name is already defined as a class/interface * * @param sName * Name to search * @return <code>true</code> if the passed variable is contained */ public boolean isDeclared (@Nullable final String sName) { return m_aDecls.containsKey (sName); }
public final boolean containsItemWithDataID (@Nullable final KEYTYPE aDataID) { return m_aItemStore.containsKey (aDataID); }
public boolean isNamespaceURIMapped (@Nullable final String sNamespaceURI) { return m_aNS2Prefix.containsKey (sNamespaceURI); }
public final boolean containsChildItemWithDataID (@Nullable final KEYTYPE aDataID) { return m_aChildMap != null && m_aChildMap.containsKey (aDataID); }
@Nonnull protected final ITEMTYPE addToItemStore (@Nonnull final KEYTYPE aDataID, @Nonnull final ITEMTYPE aItem) { // Is the ID already in use? if (m_aItemStore.containsKey (aDataID)) throw new IllegalArgumentException ("An item with ID '" + aDataID + "' is already contained!"); m_aItemStore.put (aDataID, aItem); return aItem; }
/** * @param sID * the id to look up * @return looks up if the compressed attachment contain the given ID */ default boolean containsCompressedAttachmentID (@Nullable final String sID) { final ICommonsMap <String, EAS4CompressionMode> aIDs = getCompressedAttachmentIDs (); return aIDs != null && aIDs.containsKey (sID); }
public static boolean isShortHandProperty (@Nullable final ECSSProperty eProperty) { if (eProperty == null) return false; return s_aRWLock.readLocked ( () -> s_aMap.containsKey (eProperty)); }
private void _addItem (@Nonnull final NamedSMTPSettings aNamedSMTPSettings) { final String sUserID = aNamedSMTPSettings.getID (); if (m_aMap.containsKey (sUserID)) throw new IllegalArgumentException ("NamedSMTPSettings ID " + sUserID + " is already in use!"); m_aMap.put (sUserID, aNamedSMTPSettings); }
public boolean isRegisteredFunction (@Nullable final String sFunctionName) { if (StringHelper.hasNoText (sFunctionName)) return false; return m_aRWLock.readLocked ( () -> m_aFuncDecls.containsKey (sFunctionName)); }
@MustBeLocked (ELockType.READ) protected final boolean internalContainsWithID (@Nullable final String sID) { if (StringHelper.hasNoText (sID)) return false; return m_aMap.containsKey (sID); }
public void registerProfile (@Nonnull final IAS4Profile aAS4Profile) { ValueEnforcer.notNull (aAS4Profile, "AS4Profile"); final String sID = aAS4Profile.getID (); m_aRWLock.writeLocked ( () -> { if (m_aMap.containsKey (sID)) throw new IllegalStateException ("An AS4 profile with ID '" + sID + "' is already registered!"); m_aMap.put (sID, aAS4Profile); }); LOGGER.info ("Registered AS4 profile '" + sID + "'"); }
public boolean containsItemWithKey (@Nullable final String sKey) { if (StringHelper.hasNoText (sKey)) return false; final String sRealKey = _unifyKey (sKey); return m_aRWLock.readLocked ( () -> m_aMap.containsKey (sRealKey)); }
@IsLocked (ELockType.READ) public final boolean containsWithID (@Nullable final String sID) { if (StringHelper.hasNoText (sID)) return false; return m_aRWLock.readLocked ( () -> m_aMap.containsKey (sID)); }
public void registerSMPBackend (@Nonnull @Nonempty final String sID, @Nonnull final ISupplier <? extends ISMPManagerProvider> aFactory) { ValueEnforcer.notEmpty (sID, "ID"); ValueEnforcer.notNull (aFactory, "Factory"); m_aRWLock.writeLocked ( () -> { if (m_aMap.containsKey (sID)) throw new IllegalArgumentException ("Another SMP backend with ID '" + sID + "' is already registered!"); m_aMap.put (sID, aFactory); }); }
public void registerSMPBackend (@Nonnull @Nonempty final String sID, @Nonnull final ISupplier <? extends ISMPManagerProvider> aFactory) { ValueEnforcer.notEmpty (sID, "ID"); ValueEnforcer.notNull (aFactory, "Factory"); m_aRWLock.writeLocked ( () -> { if (m_aMap.containsKey (sID)) throw new IllegalArgumentException ("Another SMP backend with ID '" + sID + "' is already registered!"); m_aMap.put (sID, aFactory); }); }
public static void registerDefaultPort (@Nonnull @Nonempty final String sSchemeName, @Nonnegative final int nPort) { ValueEnforcer.notEmpty (sSchemeName, "SchemeName"); ValueEnforcer.isTrue (NetworkPortHelper.isValidPort (nPort), "Invalid port provided"); s_aRWLock.writeLocked ( () -> { if (s_aMap.containsKey (sSchemeName)) throw new IllegalArgumentException ("A default port for scheme '" + sSchemeName + "' is already registered!"); s_aMap.put (sSchemeName, Integer.valueOf (nPort)); }); }
public static void registerShortHandDescriptor (@Nonnull final CSSShortHandDescriptor aDescriptor) { ValueEnforcer.notNull (aDescriptor, "Descriptor"); final ECSSProperty eProperty = aDescriptor.getProperty (); s_aRWLock.writeLocked ( () -> { if (s_aMap.containsKey (eProperty)) throw new IllegalStateException ("A short hand for property '" + eProperty.getName () + "' is already registered!"); s_aMap.put (eProperty, aDescriptor); }); }
public final void addComponent (@Nonnull @Nonempty final String sComponentID, @Nonnull final IDynamicComponent aComponent) throws ComponentDuplicateException { ValueEnforcer.notEmpty (sComponentID, "ComponentID"); ValueEnforcer.notNull (aComponent, "Component"); if (m_aComponents.containsKey (sComponentID)) throw new ComponentDuplicateException (sComponentID); m_aComponents.put (sComponentID, aComponent); }
public synchronized void bind (final IScheduler sched) throws SchedulerException { final String sKey = sched.getSchedulerName (); if (m_aSchedulers.containsKey (sKey)) throw new SchedulerException ("Scheduler with name '" + sKey + "' already exists."); m_aSchedulers.put (sKey, sched); }
public static void registerQueryBinding (@Nonnull @Nonempty final String sName, @Nonnull final IPSQueryBinding aQueryBinding) throws SchematronBindException { ValueEnforcer.notEmpty (sName, "Name"); ValueEnforcer.notNull (aQueryBinding, "QueryBinding"); s_aRWLock.writeLockedThrowing ( () -> { if (s_aMap.containsKey (sName)) throw new SchematronBindException ("A queryBinding with the name '" + sName + "' is already registered!"); s_aMap.put (sName, aQueryBinding); }); }