Migrated code to Java 8.
This commit is contained in:
parent
2005888197
commit
5a8e2130df
3 changed files with 4 additions and 5 deletions
|
@ -1626,7 +1626,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
||||||
{
|
{
|
||||||
StringList result;
|
StringList result;
|
||||||
|
|
||||||
Collections.sort(this, Collator.getInstance());
|
sort(Collator.getInstance());
|
||||||
|
|
||||||
//
|
//
|
||||||
result = this;
|
result = this;
|
||||||
|
@ -1640,11 +1640,11 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
||||||
*
|
*
|
||||||
* @return This List.
|
* @return This List.
|
||||||
*/
|
*/
|
||||||
public StringList sort(final Comparator<String> comparator)
|
public StringList sortBy(final Comparator<? super String> comparator)
|
||||||
{
|
{
|
||||||
StringList result;
|
StringList result;
|
||||||
|
|
||||||
Collections.sort(this, comparator);
|
sort(comparator);
|
||||||
|
|
||||||
//
|
//
|
||||||
result = this;
|
result = this;
|
||||||
|
|
|
@ -29,7 +29,6 @@ import fr.devinsy.util.strings.StringsUtils;
|
||||||
*/
|
*/
|
||||||
public class StringsDemo
|
public class StringsDemo
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main method.
|
* The main method.
|
||||||
*
|
*
|
||||||
|
|
|
@ -369,7 +369,7 @@ public class StringListTest
|
||||||
buffer.append("ghi");
|
buffer.append("ghi");
|
||||||
|
|
||||||
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "abc"));
|
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "abc"));
|
||||||
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "dbf"));
|
Assert.assertFalse(buffer.containsAnyIgnoreCase("aaa", "bbb", "dbf"));
|
||||||
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "ghi"));
|
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "ghi"));
|
||||||
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "Abc"));
|
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "Abc"));
|
||||||
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "dEf"));
|
Assert.assertTrue(buffer.containsAnyIgnoreCase("aaa", "bbb", "dEf"));
|
||||||
|
|
Loading…
Reference in a new issue