From c8eb4f83663208d42a6c004887665fb9c819c21b Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 1 May 2017 23:09:38 +0200 Subject: [PATCH] Fixed licence headers. --- .../util/strings/StringLengthComparator.java | 8 +- src/fr/devinsy/util/strings/StringList.java | 19 +- .../util/strings/StringListCharIterator.java | 9 +- .../util/strings/StringListCharPosition.java | 9 +- .../util/strings/StringListInputStream.java | 9 +- .../util/strings/StringListReader.java | 8 +- .../devinsy/util/strings/StringListUtils.java | 12 +- .../util/strings/StringListWriter.java | 8 +- src/fr/devinsy/util/strings/StringSet.java | 10 +- .../devinsy/util/strings/StringListTest.java | 10 +- .../util/strings/StringListUtilsTest.java | 224 +++++++++--------- 11 files changed, 167 insertions(+), 159 deletions(-) diff --git a/src/fr/devinsy/util/strings/StringLengthComparator.java b/src/fr/devinsy/util/strings/StringLengthComparator.java index adac2f1..e42821a 100644 --- a/src/fr/devinsy/util/strings/StringLengthComparator.java +++ b/src/fr/devinsy/util/strings/StringLengthComparator.java @@ -1,20 +1,20 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringList.java b/src/fr/devinsy/util/strings/StringList.java index 873f541..53a1250 100644 --- a/src/fr/devinsy/util/strings/StringList.java +++ b/src/fr/devinsy/util/strings/StringList.java @@ -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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; @@ -29,9 +31,10 @@ import java.util.Iterator; import org.apache.commons.lang3.StringUtils; /** - * This class is a collection of String objects with specific methods. It makes - * possible to build a string without any copy. The goal is to optimize the - * building of strings where they are lot of concatenation action. + * The StringList class is a collection of String objects with + * specific methods. It makes possible to build a string without any copy. The + * goal is to optimize the building of strings where they are lot of + * concatenation action. * */ public class StringList extends ArrayList implements CharSequence diff --git a/src/fr/devinsy/util/strings/StringListCharIterator.java b/src/fr/devinsy/util/strings/StringListCharIterator.java index 4f84c1b..4f11c9a 100644 --- a/src/fr/devinsy/util/strings/StringListCharIterator.java +++ b/src/fr/devinsy/util/strings/StringListCharIterator.java @@ -1,20 +1,21 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringListCharPosition.java b/src/fr/devinsy/util/strings/StringListCharPosition.java index 5940e53..ce1cac4 100644 --- a/src/fr/devinsy/util/strings/StringListCharPosition.java +++ b/src/fr/devinsy/util/strings/StringListCharPosition.java @@ -1,20 +1,21 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringListInputStream.java b/src/fr/devinsy/util/strings/StringListInputStream.java index 95ab552..be558bd 100644 --- a/src/fr/devinsy/util/strings/StringListInputStream.java +++ b/src/fr/devinsy/util/strings/StringListInputStream.java @@ -1,20 +1,21 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringListReader.java b/src/fr/devinsy/util/strings/StringListReader.java index 465739a..ecacd6f 100644 --- a/src/fr/devinsy/util/strings/StringListReader.java +++ b/src/fr/devinsy/util/strings/StringListReader.java @@ -1,20 +1,20 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringListUtils.java b/src/fr/devinsy/util/strings/StringListUtils.java index 9ad0a7a..01e8cba 100644 --- a/src/fr/devinsy/util/strings/StringListUtils.java +++ b/src/fr/devinsy/util/strings/StringListUtils.java @@ -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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringListWriter.java b/src/fr/devinsy/util/strings/StringListWriter.java index b52bf3c..ad9c809 100644 --- a/src/fr/devinsy/util/strings/StringListWriter.java +++ b/src/fr/devinsy/util/strings/StringListWriter.java @@ -1,20 +1,20 @@ /** * 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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/src/fr/devinsy/util/strings/StringSet.java b/src/fr/devinsy/util/strings/StringSet.java index f69a951..07866f2 100644 --- a/src/fr/devinsy/util/strings/StringSet.java +++ b/src/fr/devinsy/util/strings/StringSet.java @@ -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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/test/fr/devinsy/util/strings/StringListTest.java b/test/fr/devinsy/util/strings/StringListTest.java index 7983764..1725084 100644 --- a/test/fr/devinsy/util/strings/StringListTest.java +++ b/test/fr/devinsy/util/strings/StringListTest.java @@ -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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; diff --git a/test/fr/devinsy/util/strings/StringListUtilsTest.java b/test/fr/devinsy/util/strings/StringListUtilsTest.java index 097d37f..e4be85b 100644 --- a/test/fr/devinsy/util/strings/StringListUtilsTest.java +++ b/test/fr/devinsy/util/strings/StringListUtilsTest.java @@ -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 * the Free Software Foundation, either version 3 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with Devinsy-utils. If not, see + * along with devinsy-strings. If not, see */ package fr.devinsy.util.strings; @@ -34,141 +34,141 @@ import org.junit.Test; */ 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 - public void before() - { - BasicConfigurator.configure(); - Logger.getRootLogger().setLevel(Level.ERROR); - } + @Before + public void before() + { + BasicConfigurator.configure(); + Logger.getRootLogger().setLevel(Level.ERROR); + } - /** + /** * */ - @Test - public void testContainsBlank01() - { - Assert.assertFalse(StringListUtils.containsBlank((Collection) null)); - 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", "", "ccc"))); - Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", " ", "ccc"))); - } + @Test + public void testContainsBlank01() + { + Assert.assertFalse(StringListUtils.containsBlank((Collection) null)); + 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", "", "ccc"))); + Assert.assertTrue(StringListUtils.containsBlank(new StringList("aaa", " ", "ccc"))); + } - /** + /** * */ - @Test - public void testContainsBlank02() - { - Assert.assertFalse(StringListUtils.containsBlank((String[]) null)); - Assert.assertFalse(StringListUtils.containsBlank("aaa", "bbb", "ccc")); - Assert.assertTrue(StringListUtils.containsBlank("aaa", null, "ccc")); - Assert.assertTrue(StringListUtils.containsBlank("aaa", "", "ccc")); - Assert.assertTrue(StringListUtils.containsBlank("aaa", " ", "ccc")); - } + @Test + public void testContainsBlank02() + { + Assert.assertFalse(StringListUtils.containsBlank((String[]) null)); + Assert.assertFalse(StringListUtils.containsBlank("aaa", "bbb", "ccc")); + Assert.assertTrue(StringListUtils.containsBlank("aaa", null, "ccc")); + Assert.assertTrue(StringListUtils.containsBlank("aaa", "", "ccc")); + Assert.assertTrue(StringListUtils.containsBlank("aaa", " ", "ccc")); + } - /** + /** * */ - @Test - public void testContainsBlank03() - { - Assert.assertFalse(StringListUtils.containsBlank((ArrayList) null)); - ArrayList source = new ArrayList(); - source.add("aaa"); - source.add("bbb"); - source.add("ccc"); - Assert.assertFalse(StringListUtils.containsBlank(source)); - source.set(1, null); - Assert.assertTrue(StringListUtils.containsBlank(source)); - source.set(1, ""); - Assert.assertTrue(StringListUtils.containsBlank(source)); - source.set(1, " "); - Assert.assertTrue(StringListUtils.containsBlank(source)); - } + @Test + public void testContainsBlank03() + { + Assert.assertFalse(StringListUtils.containsBlank((ArrayList) null)); + ArrayList source = new ArrayList(); + source.add("aaa"); + source.add("bbb"); + source.add("ccc"); + Assert.assertFalse(StringListUtils.containsBlank(source)); + source.set(1, null); + Assert.assertTrue(StringListUtils.containsBlank(source)); + source.set(1, ""); + Assert.assertTrue(StringListUtils.containsBlank(source)); + source.set(1, " "); + Assert.assertTrue(StringListUtils.containsBlank(source)); + } - /** + /** * */ - @Test - public void testContainsEmpty01() - { - Assert.assertFalse(StringListUtils.containsEmpty((Collection) null)); - 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", "", "ccc"))); - } + @Test + public void testContainsEmpty01() + { + Assert.assertFalse(StringListUtils.containsEmpty((Collection) null)); + 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", "", "ccc"))); + } - /** + /** * */ - @Test - public void testContainsEmpty02() - { - Assert.assertFalse(StringListUtils.containsEmpty((String[]) null)); - Assert.assertFalse(StringListUtils.containsEmpty("aaa", "bbb", "ccc")); - Assert.assertTrue(StringListUtils.containsEmpty("aaa", null, "ccc")); - Assert.assertTrue(StringListUtils.containsEmpty("aaa", "", "ccc")); - } + @Test + public void testContainsEmpty02() + { + Assert.assertFalse(StringListUtils.containsEmpty((String[]) null)); + Assert.assertFalse(StringListUtils.containsEmpty("aaa", "bbb", "ccc")); + Assert.assertTrue(StringListUtils.containsEmpty("aaa", null, "ccc")); + Assert.assertTrue(StringListUtils.containsEmpty("aaa", "", "ccc")); + } - /** + /** * */ - @Test - public void testContainsEmpty03() - { - Assert.assertFalse(StringListUtils.containsEmpty((ArrayList) null)); - ArrayList source = new ArrayList(); - source.add("aaa"); - source.add("bbb"); - source.add("ccc"); - Assert.assertFalse(StringListUtils.containsEmpty(source)); - source.set(1, null); - Assert.assertTrue(StringListUtils.containsEmpty(source)); - source.set(1, ""); - Assert.assertTrue(StringListUtils.containsEmpty(source)); - } + @Test + public void testContainsEmpty03() + { + Assert.assertFalse(StringListUtils.containsEmpty((ArrayList) null)); + ArrayList source = new ArrayList(); + source.add("aaa"); + source.add("bbb"); + source.add("ccc"); + Assert.assertFalse(StringListUtils.containsEmpty(source)); + source.set(1, null); + Assert.assertTrue(StringListUtils.containsEmpty(source)); + source.set(1, ""); + Assert.assertTrue(StringListUtils.containsEmpty(source)); + } - /** + /** * */ - @Test - public void testContainsNull01() - { - Assert.assertFalse(StringListUtils.containsNull((Collection) null)); - Assert.assertFalse(StringListUtils.containsNull(new StringList("aaa", "bbb", "ccc"))); - Assert.assertTrue(StringListUtils.containsNull(new StringList("aaa", null, "ccc"))); - } + @Test + public void testContainsNull01() + { + Assert.assertFalse(StringListUtils.containsNull((Collection) null)); + Assert.assertFalse(StringListUtils.containsNull(new StringList("aaa", "bbb", "ccc"))); + Assert.assertTrue(StringListUtils.containsNull(new StringList("aaa", null, "ccc"))); + } - /** + /** * */ - @Test - public void testContainsNull02() - { - Assert.assertFalse(StringListUtils.containsNull((String[]) null)); - Assert.assertFalse(StringListUtils.containsNull("aaa", "bbb", "ccc")); - Assert.assertTrue(StringListUtils.containsNull("aaa", null, "ccc")); - } + @Test + public void testContainsNull02() + { + Assert.assertFalse(StringListUtils.containsNull((String[]) null)); + Assert.assertFalse(StringListUtils.containsNull("aaa", "bbb", "ccc")); + Assert.assertTrue(StringListUtils.containsNull("aaa", null, "ccc")); + } - /** + /** * */ - @Test - public void testContainsNull03() - { - Assert.assertFalse(StringListUtils.containsNull((ArrayList) null)); - ArrayList source = new ArrayList(); - source.add("aaa"); - source.add("bbb"); - source.add("ccc"); - Assert.assertFalse(StringListUtils.containsNull(source)); - source.set(1, null); - Assert.assertTrue(StringListUtils.containsNull(source)); - } + @Test + public void testContainsNull03() + { + Assert.assertFalse(StringListUtils.containsNull((ArrayList) null)); + ArrayList source = new ArrayList(); + source.add("aaa"); + source.add("bbb"); + source.add("ccc"); + Assert.assertFalse(StringListUtils.containsNull(source)); + source.set(1, null); + Assert.assertTrue(StringListUtils.containsNull(source)); + } }