Fixed licence headers.
This commit is contained in:
parent
03e723cf36
commit
c8eb4f8366
11 changed files with 167 additions and 159 deletions
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2008-2010, 2013-2015 Christian Pierre MOMON
|
* Copyright (C) 2008-2010 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2013-2015 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
@ -29,9 +31,10 @@ import java.util.Iterator;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is a collection of String objects with specific methods. It makes
|
* The <code>StringList</code> class is a collection of String objects with
|
||||||
* possible to build a string without any copy. The goal is to optimize the
|
* specific methods. It makes possible to build a string without any copy. The
|
||||||
* building of strings where they are lot of concatenation action.
|
* goal is to optimize the building of strings where they are lot of
|
||||||
|
* concatenation action.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class StringList extends ArrayList<String> implements CharSequence
|
public class StringList extends ArrayList<String> implements CharSequence
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2014-2015 Christian Pierre MOMON
|
* Copyright (C) 2014-2015 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2015 Christian Pierre MOMON
|
* Copyright (C) 2013-2015 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2015 Christian Pierre MOMON
|
* Copyright (C) 2013-2015 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2008-2010, 2013-2016 Christian Pierre MOMON
|
* Copyright (C) 2008-2010 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2013-2016 Christian Pierre MOMON
|
||||||
|
* Copyright (C) 2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
* Copyright (C) 2013-2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2014-2016 Christian Pierre MOMON
|
* Copyright (C) 2014-2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013,2014 Christian Pierre MOMON
|
* Copyright (C) 2013,2014,2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013,2014 Christian Pierre MOMON
|
* Copyright (C) 2013,2014,2017 Christian Pierre MOMON
|
||||||
*
|
*
|
||||||
* This file is part of Devinsy-utils.
|
* This file is part of devinsy-strings.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is free software: you can redistribute it and/or modify
|
* devinsy-strings is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Devinsy-utils is distributed in the hope that it will be useful,
|
* devinsy-strings is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
|
* along with devinsy-strings. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.util.strings;
|
package fr.devinsy.util.strings;
|
||||||
|
|
||||||
|
@ -34,141 +34,141 @@ import org.junit.Test;
|
||||||
*/
|
*/
|
||||||
public class StringListUtilsTest
|
public class StringListUtilsTest
|
||||||
{
|
{
|
||||||
private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(StringListUtilsTest.class);
|
private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(StringListUtilsTest.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Before
|
@Before
|
||||||
public void before()
|
public void before()
|
||||||
{
|
{
|
||||||
BasicConfigurator.configure();
|
BasicConfigurator.configure();
|
||||||
Logger.getRootLogger().setLevel(Level.ERROR);
|
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsBlank01()
|
public void testContainsBlank01()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsBlank((Collection<String>) null));
|
Assert.assertFalse(StringListUtils.containsBlank((Collection<String>) null));
|
||||||
Assert.assertFalse(StringListUtils.containsBlank(new StringList("aaa", "bbb", "ccc")));
|
Assert.assertFalse(StringListUtils.containsBlank(new StringList("aaa", "bbb", "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", null, "ccc")));
|
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", null, "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", "", "ccc")));
|
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", "", "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", " ", "ccc")));
|
Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", " ", "ccc")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsBlank02()
|
public void testContainsBlank02()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsBlank((String[]) null));
|
Assert.assertFalse(StringListUtils.containsBlank((String[]) null));
|
||||||
Assert.assertFalse(StringListUtils.containsBlank("aaa", "bbb", "ccc"));
|
Assert.assertFalse(StringListUtils.containsBlank("aaa", "bbb", "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank("aaa", null, "ccc"));
|
Assert.assertTrue(StringListUtils.containsBlank("aaa", null, "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank("aaa", "", "ccc"));
|
Assert.assertTrue(StringListUtils.containsBlank("aaa", "", "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsBlank("aaa", " ", "ccc"));
|
Assert.assertTrue(StringListUtils.containsBlank("aaa", " ", "ccc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsBlank03()
|
public void testContainsBlank03()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsBlank((ArrayList<String>) null));
|
Assert.assertFalse(StringListUtils.containsBlank((ArrayList<String>) null));
|
||||||
ArrayList<String> source = new ArrayList<String>();
|
ArrayList<String> source = new ArrayList<String>();
|
||||||
source.add("aaa");
|
source.add("aaa");
|
||||||
source.add("bbb");
|
source.add("bbb");
|
||||||
source.add("ccc");
|
source.add("ccc");
|
||||||
Assert.assertFalse(StringListUtils.containsBlank(source));
|
Assert.assertFalse(StringListUtils.containsBlank(source));
|
||||||
source.set(1, null);
|
source.set(1, null);
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(source));
|
Assert.assertTrue(StringListUtils.containsBlank(source));
|
||||||
source.set(1, "");
|
source.set(1, "");
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(source));
|
Assert.assertTrue(StringListUtils.containsBlank(source));
|
||||||
source.set(1, " ");
|
source.set(1, " ");
|
||||||
Assert.assertTrue(StringListUtils.containsBlank(source));
|
Assert.assertTrue(StringListUtils.containsBlank(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsEmpty01()
|
public void testContainsEmpty01()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty((Collection<String>) null));
|
Assert.assertFalse(StringListUtils.containsEmpty((Collection<String>) null));
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty(new StringList("aaa", "bbb", "ccc")));
|
Assert.assertFalse(StringListUtils.containsEmpty(new StringList("aaa", "bbb", "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty(new StringList("aaa", null, "ccc")));
|
Assert.assertTrue(StringListUtils.containsEmpty(new StringList("aaa", null, "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty(new StringList("aaa", "", "ccc")));
|
Assert.assertTrue(StringListUtils.containsEmpty(new StringList("aaa", "", "ccc")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsEmpty02()
|
public void testContainsEmpty02()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty((String[]) null));
|
Assert.assertFalse(StringListUtils.containsEmpty((String[]) null));
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty("aaa", "bbb", "ccc"));
|
Assert.assertFalse(StringListUtils.containsEmpty("aaa", "bbb", "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty("aaa", null, "ccc"));
|
Assert.assertTrue(StringListUtils.containsEmpty("aaa", null, "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty("aaa", "", "ccc"));
|
Assert.assertTrue(StringListUtils.containsEmpty("aaa", "", "ccc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsEmpty03()
|
public void testContainsEmpty03()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty((ArrayList<String>) null));
|
Assert.assertFalse(StringListUtils.containsEmpty((ArrayList<String>) null));
|
||||||
ArrayList<String> source = new ArrayList<String>();
|
ArrayList<String> source = new ArrayList<String>();
|
||||||
source.add("aaa");
|
source.add("aaa");
|
||||||
source.add("bbb");
|
source.add("bbb");
|
||||||
source.add("ccc");
|
source.add("ccc");
|
||||||
Assert.assertFalse(StringListUtils.containsEmpty(source));
|
Assert.assertFalse(StringListUtils.containsEmpty(source));
|
||||||
source.set(1, null);
|
source.set(1, null);
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty(source));
|
Assert.assertTrue(StringListUtils.containsEmpty(source));
|
||||||
source.set(1, "");
|
source.set(1, "");
|
||||||
Assert.assertTrue(StringListUtils.containsEmpty(source));
|
Assert.assertTrue(StringListUtils.containsEmpty(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsNull01()
|
public void testContainsNull01()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsNull((Collection<String>) null));
|
Assert.assertFalse(StringListUtils.containsNull((Collection<String>) null));
|
||||||
Assert.assertFalse(StringListUtils.containsNull(new StringList("aaa", "bbb", "ccc")));
|
Assert.assertFalse(StringListUtils.containsNull(new StringList("aaa", "bbb", "ccc")));
|
||||||
Assert.assertTrue(StringListUtils.containsNull(new StringList("aaa", null, "ccc")));
|
Assert.assertTrue(StringListUtils.containsNull(new StringList("aaa", null, "ccc")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsNull02()
|
public void testContainsNull02()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsNull((String[]) null));
|
Assert.assertFalse(StringListUtils.containsNull((String[]) null));
|
||||||
Assert.assertFalse(StringListUtils.containsNull("aaa", "bbb", "ccc"));
|
Assert.assertFalse(StringListUtils.containsNull("aaa", "bbb", "ccc"));
|
||||||
Assert.assertTrue(StringListUtils.containsNull("aaa", null, "ccc"));
|
Assert.assertTrue(StringListUtils.containsNull("aaa", null, "ccc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testContainsNull03()
|
public void testContainsNull03()
|
||||||
{
|
{
|
||||||
Assert.assertFalse(StringListUtils.containsNull((ArrayList<String>) null));
|
Assert.assertFalse(StringListUtils.containsNull((ArrayList<String>) null));
|
||||||
ArrayList<String> source = new ArrayList<String>();
|
ArrayList<String> source = new ArrayList<String>();
|
||||||
source.add("aaa");
|
source.add("aaa");
|
||||||
source.add("bbb");
|
source.add("bbb");
|
||||||
source.add("ccc");
|
source.add("ccc");
|
||||||
Assert.assertFalse(StringListUtils.containsNull(source));
|
Assert.assertFalse(StringListUtils.containsNull(source));
|
||||||
source.set(1, null);
|
source.set(1, null);
|
||||||
Assert.assertTrue(StringListUtils.containsNull(source));
|
Assert.assertTrue(StringListUtils.containsNull(source));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue