/** * @return A list of the IDs of the supported TLS versions in the correct order. * May be <code>null</code> if no TLS versions are defined. */ @Nullable default String [] getAllTLSVersionIDsAsArray () { final ICommonsList <String> aList = getAllTLSVersionIDs (); return aList.isEmpty () ? null : aList.toArray (new String [aList.size ()]); }
@Override public final boolean hasChildren () { return m_aChildren != null && m_aChildren.isNotEmpty (); }
@Nonnull public static VESID parseID (@Nullable final String sVESID) { final ICommonsList <String> aParts = StringHelper.getExploded (ID_SEPARATOR, sVESID); final int nSize = aParts.size (); if (nSize >= 3 && nSize <= 4) return new VESID (aParts.get (0), aParts.get (1), aParts.get (2), nSize >= 4 ? aParts.get (3) : null); throw new IllegalArgumentException ("Invalid VESID '" + sVESID + "' provided!"); }
public int [] getIntArrayProperty (final String name, final int [] def) throws NumberFormatException { final String vals = getStringProperty (name); if (vals == null) return def; final StringTokenizer stok = new StringTokenizer (vals, ","); final ICommonsList <Integer> ints = new CommonsArrayList <> (); try { while (stok.hasMoreTokens ()) { try { ints.add (Integer.valueOf (stok.nextToken ().trim ())); } catch (final NumberFormatException nfe) { throw new NumberFormatException (" '" + vals + "'"); } } final int [] outInts = new int [ints.size ()]; for (int i = 0; i < ints.size (); i++) outInts[i] = ints.get (i).intValue (); return outInts; } catch (final Exception e) { return def; } }
public void addEmph (@Nonnull final PSEmph aEmph) { ValueEnforcer.notNull (aEmph, "Emph"); m_aContent.add (aEmph); }
@Nonnull @ReturnsMutableCopy public ICommonsList <ThreadDescriptor> getAllDescriptors () { return m_aList.getClone (); }
@Nonnegative public int getDirectiveCount () { return m_aList.size (); }
@Nonnull public IJSExpression getAsExpression () { final int nSize = m_aElements.size (); if (nSize == 0) throw new IllegalStateException ("Empty jQuery selector is not allowed!"); if (nSize == 1) return m_aElements.getFirst ().getExpression (); // Concatenate with ' ' IJSExpression ret = m_aElements.getFirst ().getExpression (); for (int i = 1; i < nSize; ++i) ret = ret.plus (' ').plus (m_aElements.get (i).getExpression ()); return ret; }
/** * @return <code>true</code> if this block is empty and does not contain any * statement. */ public boolean isEmpty () { return m_aObjs.isEmpty (); }
@Override protected void onExecute (@Nonnull final JobDataMap aJobDataMap, @Nonnull final IJobExecutionContext aContext) throws JobExecutionException { final long nMins = aJobDataMap.getAsLong (KEY_MINUTES); final LocalDateTime aOldDT = PDTFactory.getCurrentLocalDateTime ().minusMinutes (nMins); final ICommonsList <String> aEvicted = MetaAS4Manager.getIncomingDuplicateMgr ().evictAllItemsBefore (aOldDT); if (aEvicted.isNotEmpty ()) LOGGER.info ("Evicted " + aEvicted.size () + " incoming duplicate message IDs"); }
@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; }
protected final void logClassPath () { // List class path elements in trace mode if (GlobalDebug.isDebugMode ()) { final ICommonsList <String> aCP = ClassPathHelper.getAllClassPathEntries (); LOGGER.info ("Class path [" + aCP.size () + " elements]:"); for (final String sCP : aCP.getSorted (Comparator.naturalOrder ())) LOGGER.info (" " + sCP); } }
/** * 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); }
@Override @Nullable public final IMicroNode getFirstChild () { return m_aChildren == null ? null : m_aChildren.getFirst (); }
@Nonnull public DataTablesServerDataCell getCellAtIndex (@Nonnegative final int nIndex) { return m_aCells.get (nIndex); } }
while (aCurrent != null) aItems.add (0, aCurrent); final DefaultTreeItemWithID <String, IMenuObject> aTreeItem = aMenuTree.getItemWithID (aCurrent.getID ()); aCurrent = aTreeItem.isRootItem () ? null : (IMenuItem) aTreeItem.getParent ().getData (); final int nItems = aItems.size (); if (nItems > 0) final IMenuItem aItem = aItems.get (i);
public void addEmph (@Nonnull final PSEmph aEmph) { ValueEnforcer.notNull (aEmph, "Emph"); m_aContent.add (aEmph); }
/** * @return A list consisting of {@link PSAssertReport} and {@link PSExtends} * parameters */ @Nonnull @ReturnsMutableCopy public ICommonsList <IPSElement> getAllContentElements () { return m_aContent.getClone (); }