下面列出了javax.annotation.RegEx#com.helger.commons.collection.impl.CommonsArrayList 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Tests iterating over a reader.
*
* @throws IOException
* if the reader fails.
*/
@Test
public void testIteratorFunctionality () throws IOException
{
final ICommonsList <ICommonsList <String>> expectedResult = new CommonsArrayList <> ();
expectedResult.add (CollectionHelper.newList ("a", "b", "aReader"));
expectedResult.add (CollectionHelper.newList ("a", "b,b,b", "aReader"));
expectedResult.add (CollectionHelper.newList ("", "", ""));
expectedResult.add (CollectionHelper.newList ("a", "PO Box 123,\nKippax,ACT. 2615.\nAustralia", "d."));
expectedResult.add (CollectionHelper.newList ("Glen \"The Man\" Smith", "Athlete", "Developer"));
expectedResult.add (CollectionHelper.newList ("\"\"", "test"));
expectedResult.add (CollectionHelper.newList ("a\nb", "b", "\nd", "e"));
int idx = 0;
try (final CSVReader aReader = _createCSVReader ())
{
for (final ICommonsList <String> line : aReader)
{
final ICommonsList <String> expectedLine = expectedResult.get (idx++);
assertEquals (expectedLine, line);
}
}
}
@Test
public void testCtor ()
{
NonBlockingStack <String> st = new NonBlockingStack <> ();
assertTrue (st.isEmpty ());
assertFalse (st.iterator ().hasNext ());
st = new NonBlockingStack <> ("s", "t");
assertEquals (2, st.size ());
assertEquals ("s", st.firstElement ());
assertTrue (st.iterator ().hasNext ());
st = new NonBlockingStack <> ((String []) null);
assertTrue (st.isEmpty ());
assertFalse (st.iterator ().hasNext ());
st = new NonBlockingStack <> (new CommonsArrayList <> ("s", "t"));
assertEquals (2, st.size ());
assertEquals ("s", st.firstElement ());
assertTrue (st.iterator ().hasNext ());
st = new NonBlockingStack <> (new CommonsHashSet <String> ());
assertTrue (st.isEmpty ());
assertFalse (st.iterator ().hasNext ());
st = new NonBlockingStack <> (new NonBlockingStack <> ("s", "t"));
assertEquals (2, st.size ());
assertEquals ("s", st.firstElement ());
assertTrue (st.iterator ().hasNext ());
}
@Ignore ("Simply wrong assumption")
@Test
public void testRedundancy ()
{
final ICommonsList <String> aInputList = new CommonsArrayList <> ("a", "b", "c", "d", "e", "f", "g", "h");
// Build all permutations of the input list, using all available slots
final ICommonsSet <ICommonsList <String>> aSimplePermutations = new CommonsHashSet <> ();
CombinationGenerator.addAllPermutations (aInputList, aInputList.size (), aSimplePermutations);
// Flexible combination generator
final ICommonsSet <ICommonsList <String>> aFlexiblePermutations = CombinationGeneratorFlexible.getCombinations (aInputList,
true);
assertTrue (aFlexiblePermutations.size () >= aSimplePermutations.size ());
// Now the assumptions: I assume that all permutations from the flexible
// generator are also contained in all permutations
for (final ICommonsList <String> aList : aFlexiblePermutations)
assertTrue (aList.toString (), aSimplePermutations.contains (aList));
}
@Test
public void testNewArrayFromCollection ()
{
String [] x = newArray (CollectionHelper.newList ("s1", "s2", "s3"), String.class);
assertNotNull (x);
assertEquals (3, x.length);
x = newArray (new CommonsArrayList <String> (), String.class);
assertNotNull (x);
x = newArray ((List <String>) null, String.class);
assertNotNull (x);
CharSequence [] y = newArray (CollectionHelper.newList ("s1", "s2", "s3"), CharSequence.class);
assertNotNull (y);
assertEquals (3, y.length);
y = newArray (CollectionHelper.newSet ("s1", "s2", "s3"), CharSequence.class);
assertNotNull (y);
assertEquals (3, y.length);
}
@Test
public void testValuesValueSep () throws CmdLineParseException
{
final Options aOptions = new Options ().addOption (Option.builder ("D")
.args (2)
.valueSeparator ('=')
.repeatable (false)
.required (true)
.build ());
final CmdLineParser p = new CmdLineParser (aOptions);
// With value separator
ParsedCmdLine aPCL = p.parse (new String [] { "-D", "name=value" });
assertTrue (aPCL.hasOption ("D"));
assertEquals ("name", aPCL.getValue ("D"));
assertEquals (new CommonsArrayList <> ("name", "value"), aPCL.values ("D"));
// Without value separator
aPCL = p.parse (new String [] { "-D", "name", "value" });
assertTrue (aPCL.hasOption ("D"));
assertEquals ("name", aPCL.getValue ("D"));
assertEquals (new CommonsArrayList <> ("name", "value"), aPCL.values ("D"));
}
@Test
@SuppressFBWarnings ("NP_NONNULL_PARAM_VIOLATION")
public void testNewSortedSetIIterableIterator ()
{
SortedSet <String> aSet = newSortedSet (new IterableIterator <> (newList ("Hallo", "Welt", null)));
assertNotNull (aSet);
assertEquals (3, aSet.size ());
assertNull (aSet.first ());
assertTrue (aSet.contains ("Hallo"));
assertTrue (aSet.contains ("Welt"));
assertTrue (aSet.contains (null));
aSet = newSortedSet (new IterableIterator <> (new CommonsArrayList <String> ()));
assertNotNull (aSet);
assertEquals (0, aSet.size ());
}
@Test
public void testList ()
{
final ICommonsList <String> aCont = new CommonsArrayList <> ("a", "b", "c");
assertTrue (EqualsHelper.equalsCollection (aCont, aCont));
assertTrue (EqualsHelper.equalsCollection (aCont, CollectionHelper.makeUnmodifiable (aCont)));
assertTrue (EqualsHelper.equalsCollection (aCont, Collections.synchronizedList (aCont)));
assertTrue (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> (aCont)));
assertTrue (EqualsHelper.equalsCollection (aCont, new CommonsLinkedList <> (aCont)));
assertTrue (EqualsHelper.equalsCollection (aCont, new CommonsVector <> (aCont)));
assertTrue (EqualsHelper.equalsCollection (aCont, new NonBlockingStack <> (aCont)));
assertTrue (EqualsHelper.equalsCollection (new CommonsArrayList <String> (), new CommonsLinkedList <String> ()));
assertTrue (EqualsHelper.equalsCollection (new NonBlockingStack <String> (), new CommonsVector <String> ()));
assertTrue (EqualsHelper.equalsCollection (new NonBlockingStack <String> (), new Stack <String> ()));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsLinkedList <String> ()));
assertFalse (EqualsHelper.equalsCollection (new CommonsLinkedList <String> (), aCont));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <String> ()));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> ("a", "b")));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> ("A", "b", "c")));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> ("a", "B", "c")));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> ("a", "b", "C")));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsArrayList <> ("a", "b", "c", "d")));
assertFalse (EqualsHelper.equalsCollection (aCont, new CommonsHashSet <> ("a", "b", "c")));
assertFalse (EqualsHelper.equalsCollection (aCont, ArrayHelper.newArray ("a", "b", "c")));
}
@Nonnull
@ReturnsMutableCopy
public final ICommonsList <DATATYPE> drainQueue ()
{
// Drain all objects to this queue
final ICommonsList <Object> aDrainedToList = new CommonsArrayList <> ();
m_aRWLock.writeLockedInt ( () -> m_aQueue.drainTo (aDrainedToList));
// Change data type
final ICommonsList <DATATYPE> ret = new CommonsArrayList <> ();
for (final Object aObj : aDrainedToList)
if (!EqualsHelper.identityEqual (aObj, STOP_QUEUE_OBJECT))
ret.add (GenericReflection.uncheckedCast (aObj));
else
{
// Re-add the stop object, because loops in derived classes rely on this
// object
m_aRWLock.writeLockedBoolean ( () -> m_aQueue.add (aObj));
}
return ret;
}
@Test
public void testAllCharsetsDoubleQuotes ()
{
for (final Charset c : XMLCharsetDeterminator.getAllSupportedCharsets ())
{
final ICommonsList <String> aNames = new CommonsArrayList <> (c.name ());
aNames.addAll (c.aliases ());
for (final String sAlias : aNames)
{
final String sXML = "<?xml version=\"1.0\" encoding=\"" + sAlias + "\"?><!-- " + c.name () + " --><root />";
if (false)
LOGGER.info (sXML);
final byte [] aBytes = sXML.getBytes (c);
final Charset aDetermined = XMLCharsetDeterminator.determineXMLCharset (aBytes);
assertEquals (c, aDetermined);
}
}
}
/**
* Get a list of all attribute values with the same name.
*
* @param nIndex
* The index to be accessed. Should be ≥ 0.
* @param aDefault
* The default value to be returned, if no such attribute is present.
* @return <code>aDefault</code> if no such attribute value exists
*/
@Nullable
default ICommonsList <String> getAsStringList (@Nonnegative final int nIndex,
@Nullable final ICommonsList <String> aDefault)
{
final Object aValue = getValue (nIndex);
if (aValue != null)
{
if (aValue instanceof String [])
{
// multiple values passed in the request
return new CommonsArrayList <> ((String []) aValue);
}
if (aValue instanceof String)
{
// single value passed in the request
return new CommonsArrayList <> ((String) aValue);
}
}
return aDefault;
}
public static void main (final String [] args)
{
logSystemInfo ();
final ICommonsList <IReadableResource> aValidSchematrons = new CommonsArrayList <> ();
for (final IReadableResource aRes : SchematronTestHelper.getAllValidSchematronFiles ())
if (!aRes.getPath ().endsWith ("/BIICORE-UBL-T01.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T10.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T14.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T15.sch") &&
!aRes.getPath ().endsWith ("/CellarBook.sch") &&
!aRes.getPath ().endsWith ("/pattern-example-with-includes.sch") &&
!aRes.getPath ().endsWith ("/pattern-example.sch") &&
!aRes.getPath ().endsWith ("/schematron-svrl.sch"))
aValidSchematrons.add (aRes);
LOGGER.info ("Starting");
final double dTime1 = benchmarkTask (new ValidSchematronPure (aValidSchematrons));
LOGGER.info ("Time pure: " + BigDecimal.valueOf (dTime1).toString () + " us");
final double dTime2 = benchmarkTask (new ValidSchematronSCH (aValidSchematrons));
LOGGER.info ("Time XSLT: " + BigDecimal.valueOf (dTime2).toString () + " us");
LOGGER.info ("Time1 is " + BigDecimal.valueOf (dTime1 / dTime2 * 100).toString () + "% of time2");
}
@Test
public void testNewListIIterableIterator ()
{
final ICommonsList <String> aSource = newList ("Hallo", "Welt", "from", "Vienna");
ICommonsList <String> aList = newList (new IterableIterator <> (aSource));
assertNotNull (aList);
assertEquals (4, aList.size ());
assertTrue (aList.contains ("Hallo"));
assertTrue (aList.contains ("Welt"));
assertTrue (aList.contains ("from"));
assertTrue (aList.contains ("Vienna"));
aList = newList (new IterableIterator <> (new CommonsArrayList <String> ()));
assertNotNull (aList);
aList = newList ((IIterableIterator <String>) null);
assertNotNull (aList);
}
/**
* Fill all items with the same ID by linearly scanning the tree.
*
* @param <KEYTYPE>
* tree ID type
* @param <DATATYPE>
* tree data type
* @param <ITEMTYPE>
* tree item type
* @param aTreeItem
* The tree item to search. May not be <code>null</code>.
* @param aSearchID
* The ID to search. May not be <code>null</code>.
* @return A non-<code>null</code> list with all matching items.
*/
@Nonnull
@ReturnsMutableCopy
public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final ITEMTYPE aTreeItem,
@Nullable final KEYTYPE aSearchID)
{
final ICommonsList <ITEMTYPE> aRetList = new CommonsArrayList <> ();
TreeVisitor.visitTreeItem (aTreeItem, new DefaultHierarchyVisitorCallback <ITEMTYPE> ()
{
@Override
@Nonnull
public EHierarchyVisitorReturn onItemBeforeChildren (@Nullable final ITEMTYPE aItem)
{
if (aItem != null && aItem.getID ().equals (aSearchID))
aRetList.add (aItem);
return EHierarchyVisitorReturn.CONTINUE;
}
});
return aRetList;
}
@Test
public void testParseUndefinedActions () throws CmdLineParseException
{
final Options aOptions = new Options ().addOption (Option.builder ("D")
.longOpt ("def")
.args (2)
.valueSeparator ('=')
.build ());
final CmdLineParser p = new CmdLineParser (aOptions);
ParsedCmdLine aPCL = p.parse (new String [] { "-foo", "-bar" });
assertFalse (aPCL.hasOption ("D"));
aPCL = p.parse (new String [] { "-Da=b", "-foo", "-bar" });
assertTrue (aPCL.hasOption ("D"));
assertEquals (new CommonsArrayList <> ("a", "b"), aPCL.values ("D"));
aPCL = p.parse (new String [] { "-D", "-foo", "-bar" });
assertTrue (aPCL.hasOption ("D"));
assertEquals (new CommonsArrayList <> ("-foo", "-bar"), aPCL.values ("D"));
}
@Nonnull
public ICommonsCollection <String> prefixMatch (@Nonnull @Nonempty final String sPrefix)
{
if (StringHelper.hasNoText (sPrefix))
throw new IllegalArgumentException ("prefix must have length >= 1");
final ICommonsList <String> aList = new CommonsArrayList <> ();
final char [] aPrefix = sPrefix.toCharArray ();
final Node <DATATYPE> aNode = _get (m_aRoot, aPrefix, 0);
if (aNode != null)
{
if (aNode.m_aValue != null)
aList.add (sPrefix);
_collect (aNode.m_aMid, sPrefix, aList);
}
return aList;
}
/**
* Gets a sublist excerpt of the passed list.
*
* @param <ELEMENTTYPE>
* Type of elements in list
* @param aCont
* The backing list. May not be <code>null</code>.
* @param nStartIndex
* The start index to use. Needs to be ≥ 0.
* @param nSectionLength
* the length of the desired subset. If list is shorter than that,
* aIter will return a shorter section
* @return The specified section of the passed list, or a shorter list if
* nStartIndex + nSectionLength is an invalid index. Never
* <code>null</code>.
*/
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE> CommonsArrayList <ELEMENTTYPE> getSubList (@Nullable final List <ELEMENTTYPE> aCont,
@Nonnegative final int nStartIndex,
@Nonnegative final int nSectionLength)
{
ValueEnforcer.isGE0 (nStartIndex, "StartIndex");
ValueEnforcer.isGE0 (nSectionLength, "SectionLength");
final int nSize = getSize (aCont);
if (nSize == 0 || nStartIndex >= nSize)
return newList (0);
int nEndIndex = nStartIndex + nSectionLength;
if (nEndIndex > nSize)
nEndIndex = nSize;
// Create a copy of the list because "subList" only returns a view of the
// original list!
return newList (aCont.subList (nStartIndex, nEndIndex));
}
@Test
public void testUseLast ()
{
final IAggregator <String, String> a1 = CollectionHelper::getLastElement;
assertEquals (a1, a1);
assertNotEquals (a1, null);
assertNotEquals (a1, "any other");
assertEquals (a1.hashCode (), a1.hashCode ());
assertNotEquals (a1.hashCode (), 0);
assertNotEquals (a1.hashCode (), "any other".hashCode ());
assertNotNull (a1.toString ());
final ICommonsList <String> l = new CommonsArrayList <> ("a", null, "b", "", "c");
assertEquals ("c", a1.apply (l));
assertNull (a1.apply (new CommonsArrayList <String> ()));
assertNull (a1.apply ((Collection <String>) null));
}
@Override
@Nonnull
@ReturnsMutableCopy
protected final CommonsArrayList <VALUETYPE> createNewCollection ()
{
return new CommonsArrayList <> ();
}
@Override
@Nonnull
@ReturnsMutableCopy
protected final CommonsArrayList <VALUETYPE> createNewCollection ()
{
return new CommonsArrayList <> ();
}
@Test
public void testIterator ()
{
final ICommonsList <String> aCont = new CommonsArrayList <> ("a", "b", "c");
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), aCont.iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), CollectionHelper.makeUnmodifiable (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), Collections.synchronizedList (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsLinkedList <> (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsVector <> (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), new NonBlockingStack <> (aCont).iterator ()));
assertTrue (EqualsHelper.equalsCollection (new CommonsArrayList <String> ().iterator (),
new CommonsLinkedList <String> ().iterator ()));
assertTrue (EqualsHelper.equalsCollection (new NonBlockingStack <String> ().iterator (), new CommonsVector <String> ().iterator ()));
assertTrue (EqualsHelper.equalsCollection (new NonBlockingStack <String> ().iterator (), new Stack <String> ().iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsLinkedList <String> ().iterator ()));
assertFalse (EqualsHelper.equalsCollection (new CommonsLinkedList <String> ().iterator (), aCont.iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <String> ().iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> ("a", "b").iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> ("A", "b", "c").iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> ("a", "B", "c").iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> ("a", "b", "C").iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsArrayList <> ("a", "b", "c", "d").iterator ()));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), new CommonsHashSet <> ("a", "b", "c")));
assertFalse (EqualsHelper.equalsCollection (aCont.iterator (), ArrayHelper.newArray ("a", "b", "c")));
}
@Override
@Nonnull
@ReturnsMutableCopy
protected final CommonsArrayList <VALUETYPE> createNewCollection ()
{
return new CommonsArrayList <> ();
}
/**
* Get a list of all failed assertions and successful reports in a given
* schematron output.
*
* @param aSchematronOutput
* The schematron output to be used. May be <code>null</code>.
* @return A non-<code>null</code> list with all failed assertions and
* successful reports. Maybe an empty list if the input is
* <code>null</code>.
*/
@Nonnull
@ReturnsMutableCopy
public static ICommonsList <AbstractSVRLMessage> getAllFailedAssertionsAndSuccessfulReports (@Nullable final SchematronOutputType aSchematronOutput)
{
final ICommonsList <AbstractSVRLMessage> ret = new CommonsArrayList <> ();
if (aSchematronOutput != null)
for (final Object aObj : aSchematronOutput.getActivePatternAndFiredRuleAndFailedAssert ())
if (aObj instanceof FailedAssert)
ret.add (new SVRLFailedAssert ((FailedAssert) aObj));
else
if (aObj instanceof SuccessfulReport)
ret.add (new SVRLSuccessfulReport ((SuccessfulReport) aObj));
return ret;
}
@Test
public void testRetainAll ()
{
final SingleElementList <String> aList = new SingleElementList <> ("init");
assertTrue (aList.retainAll (new CommonsArrayList <> ("init", "all")));
assertTrue (aList.contains ("init"));
assertFalse (aList.retainAll (new CommonsArrayList <> ("all")));
assertFalse (aList.contains ("init"));
assertFalse (aList.retainAll (new CommonsArrayList <> ("init")));
assertFalse (aList.contains ("init"));
}
@Test
public void testFloatArray ()
{
final float [] aFloats = new float [] { 5, 1.1f, 12234.5f };
assertFalse (TypeConverter.convert (aFloats, List.class).isEmpty ());
assertFalse (TypeConverter.convert (aFloats, CommonsArrayList.class).isEmpty ());
assertFalse (TypeConverter.convert (aFloats, Set.class).isEmpty ());
assertFalse (TypeConverter.convert (aFloats, CommonsHashSet.class).isEmpty ());
assertFalse (TypeConverter.convert (aFloats, CommonsLinkedHashSet.class).isEmpty ());
assertEquals (3, TypeConverter.convert (aFloats, String [].class).length);
}
@Test
public void testIsEmpty_Collection ()
{
assertTrue (isEmpty ((Collection <?>) null));
assertTrue (isEmpty (new CommonsArrayList <String> ()));
assertFalse (isEmpty (newList ("any")));
}
@Nonnull
@ReturnsMutableCopy
public ICommonsList <IMutableDirectedGraphRelation> getAllRelationObjs ()
{
final ICommonsList <IMutableDirectedGraphRelation> ret = new CommonsArrayList <> ();
for (final IMutableDirectedGraphNode aNode : m_aNodes.values ())
aNode.forEachRelation (ret::add);
return ret;
}
@Test
@SuppressFBWarnings ("RV_RETURN_VALUE_IGNORED")
public void testBasic ()
{
final ICommonsList <String> aList = LoggingInvocationHandler.proxying (ICommonsList.class,
new CommonsArrayList <> ());
aList.add ("a");
aList.add ("b");
aList.subList (0, 1).isEmpty ();
// String result is not proxied because it is no interface
aList.remove (0).length ();
}
@Nonnull
@ReturnsMutableCopy
public static ICommonsList <Attr> getAllAttributesAsList (@Nullable final Element aSrcNode)
{
final ICommonsList <Attr> ret = new CommonsArrayList <> ();
NamedNodeMapIterator.createAttributeIterator (aSrcNode).forEach (x -> ret.add ((Attr) x));
return ret;
}
@Nonnull
@ReturnsMutableCopy
public static CommonsArrayList <Short> newPrimitiveList (@Nullable final short... aValues)
{
final CommonsArrayList <Short> ret = new CommonsArrayList <> ();
if (aValues != null)
for (final short aValue : aValues)
ret.add (Short.valueOf (aValue));
return ret;
}
@Test
public void testContainsOnly ()
{
assertTrue (containsOnly (new CommonsArrayList <> ("a"), StringHelper::hasText));
assertTrue (containsOnly (new CommonsArrayList <> ("a", "b"), StringHelper::hasText));
assertTrue (containsOnly (new CommonsArrayList <> ("a"), null));
assertTrue (containsOnly (new CommonsArrayList <> ("a", "b"), null));
assertTrue (containsOnly (new CommonsArrayList <> ("a", ""), null));
assertFalse (containsOnly (new CommonsArrayList <> ("a", ""), StringHelper::hasText));
assertFalse (containsOnly (new CommonsArrayList <> ("", ""), StringHelper::hasText));
assertFalse (containsOnly (new CommonsArrayList <String> (), StringHelper::hasText));
assertFalse (containsOnly (new CommonsArrayList <> (), null));
}