branch develop updated (e46e40c -> 4d0e450)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git from e46e40c Fixes #3861 Merge branch 'feature/3861' into develop new 5dd42a8 First pass to fix javadoc syntax (See #3797) new 19ab5ac Second pass to add FIXME on missing javadoc params and return (See #3797) new 4d0e450 Fixes #3797 Merge branch 'feature/3797_javadoc_8' into develop The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 4d0e450ce19604707155c19d3d8aed33c0a8c1ab Merge: e46e40c 19ab5ac Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:45:42 2016 +0100 Fixes #3797 Merge branch 'feature/3797_javadoc_8' into develop commit 19ab5ac7583324af41a004bf0610e4df71854888 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:45:34 2016 +0100 Second pass to add FIXME on missing javadoc params and return (See #3797) commit 5dd42a84a6ff17c5b770e168bc4923789a14b6ef Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:01:42 2016 +0100 First pass to fix javadoc syntax (See #3797) Summary of changes: src/main/java/org/nuiton/util/AliasMap.java | 39 +-- src/main/java/org/nuiton/util/ArrayUtil.java | 18 +- src/main/java/org/nuiton/util/BoundedList.java | 25 +- .../util/BoundedListOutOfBoundsException.java | 14 +- src/main/java/org/nuiton/util/CallAnalyse.java | 57 ++-- .../java/org/nuiton/util/CardinalityHelper.java | 34 +-- .../org/nuiton/util/CategorisedListenerSet.java | 4 +- src/main/java/org/nuiton/util/ClassLoaderUtil.java | 6 +- src/main/java/org/nuiton/util/CollectionUtil.java | 48 ++-- src/main/java/org/nuiton/util/DateUtil.java | 15 +- src/main/java/org/nuiton/util/DesktopUtil.java | 8 +- src/main/java/org/nuiton/util/DigestGenerator.java | 74 ++--- .../nuiton/util/FasterCachedResourceResolver.java | 15 +- src/main/java/org/nuiton/util/FileUtil.java | 189 ++++++------- src/main/java/org/nuiton/util/GZUtil.java | 24 +- src/main/java/org/nuiton/util/GZUtilException.java | 2 +- src/main/java/org/nuiton/util/HashList.java | 4 +- src/main/java/org/nuiton/util/LRUMapMultiKey.java | 16 +- src/main/java/org/nuiton/util/ListenerSet.java | 4 +- .../java/org/nuiton/util/LoggingException.java | 3 +- .../org/nuiton/util/LoggingPatternFormatter.java | 81 +++--- src/main/java/org/nuiton/util/MD5InputStream.java | 4 +- src/main/java/org/nuiton/util/MatrixMap.java | 304 ++++++++++++--------- src/main/java/org/nuiton/util/MonthEnum.java | 2 +- src/main/java/org/nuiton/util/NumberUtil.java | 2 +- src/main/java/org/nuiton/util/ObjectUtil.java | 62 +++-- src/main/java/org/nuiton/util/PagerBean.java | 4 +- src/main/java/org/nuiton/util/PagerBeanUtil.java | 6 +- src/main/java/org/nuiton/util/PeriodDates.java | 5 +- .../util/PropertiesDateRemoveFilterStream.java | 6 +- .../java/org/nuiton/util/RecursiveProperties.java | 6 +- src/main/java/org/nuiton/util/ReflectUtil.java | 33 ++- src/main/java/org/nuiton/util/Resource.java | 38 +-- .../java/org/nuiton/util/ResourceException.java | 3 +- .../org/nuiton/util/ResourceNotFoundException.java | 3 +- .../java/org/nuiton/util/ResourceResolver.java | 39 +-- .../java/org/nuiton/util/ReverseFileReader.java | 3 +- src/main/java/org/nuiton/util/SemVer.java | 212 ++++++++------ .../java/org/nuiton/util/SortedProperties.java | 4 +- src/main/java/org/nuiton/util/StringUtil.java | 46 ++-- .../java/org/nuiton/util/StringUtilException.java | 1 - src/main/java/org/nuiton/util/TimeLog.java | 15 +- .../org/nuiton/util/TransparenteSoftReference.java | 2 +- .../org/nuiton/util/TransparenteWeakReference.java | 4 +- src/main/java/org/nuiton/util/Version.java | 37 ++- src/main/java/org/nuiton/util/VersionUtil.java | 50 ++-- src/main/java/org/nuiton/util/ZipUtil.java | 45 ++- .../java/org/nuiton/util/beans/BeanMonitor.java | 18 +- src/main/java/org/nuiton/util/beans/BeanUtil.java | 5 +- src/main/java/org/nuiton/util/beans/Binder.java | 28 +- .../java/org/nuiton/util/beans/BinderFactory.java | 30 +- .../org/nuiton/util/beans/BinderModelBuilder.java | 109 ++++---- .../org/nuiton/util/beans/InstanceFactory.java | 4 +- .../java/org/nuiton/util/beans/PropertyDiff.java | 2 +- .../java/org/nuiton/util/beans/package-info.java | 14 +- .../org/nuiton/util/converter/ColorConverter.java | 4 +- .../org/nuiton/util/converter/ConverterUtil.java | 10 +- .../org/nuiton/util/converter/EnumConverter.java | 6 +- .../org/nuiton/util/converter/FormatConverter.java | 14 +- .../util/converter/FormatConverterFactory.java | 17 +- .../java/org/nuiton/util/converter/FormatMap.java | 15 +- .../nuiton/util/converter/KeyStrokeConverter.java | 5 +- .../org/nuiton/util/converter/URIConverter.java | 2 +- .../org/nuiton/util/converter/URLConverter.java | 2 +- .../nuiton/util/converter/VersionConverter.java | 2 +- .../org/nuiton/util/converter/package-info.java | 8 +- .../util/pagination/PaginationParameter.java | 14 +- .../org/nuiton/util/rmi/RemoteMethodExecutor.java | 2 +- .../nuiton/util/rmi/RemoteMethodExecutorImpl.java | 2 +- .../org/nuiton/util/rmi/RemoteProxyFactory.java | 6 +- .../java/org/nuiton/util/rmi/ServiceExporter.java | 2 +- .../java/org/nuiton/util/rmi/package-info.java | 6 +- src/main/java/org/nuiton/util/version/SemVer.java | 123 +++++---- src/main/java/org/nuiton/util/version/Version.java | 34 +-- .../org/nuiton/util/version/VersionBuilder.java | 4 +- .../org/nuiton/util/version/VersionComparator.java | 28 +- .../org/nuiton/util/version/VersionConverter.java | 2 +- .../java/org/nuiton/util/version/Versions.java | 26 +- src/test/java/org/nuiton/util/AliasMapTest.java | 16 +- src/test/java/org/nuiton/util/CallAnalyseTest.java | 20 +- .../org/nuiton/util/CardinalityHelperTest.java | 2 +- .../nuiton/util/CategorisedListenerSetTest.java | 18 +- .../java/org/nuiton/util/CollectionUtilTest.java | 2 +- src/test/java/org/nuiton/util/FileUtilTest.java | 16 +- .../java/org/nuiton/util/LRUMapMultiKeyTest.java | 19 +- src/test/java/org/nuiton/util/ListenerSetTest.java | 2 +- .../java/org/nuiton/util/MD5InputStreamTest.java | 2 +- src/test/java/org/nuiton/util/MatrixMapTest.java | 7 +- src/test/java/org/nuiton/util/NumberUtilTest.java | 2 +- src/test/java/org/nuiton/util/ObjectUtilTest.java | 44 ++- .../java/org/nuiton/util/PagerBeanUtilTest.java | 2 +- .../org/nuiton/util/RecursivePropertiesTest.java | 11 +- src/test/java/org/nuiton/util/ReflectUtilTest.java | 2 +- src/test/java/org/nuiton/util/ResourceTest.java | 2 +- .../org/nuiton/util/ReverseFileReaderTest.java | 12 +- src/test/java/org/nuiton/util/SemVerTest.java | 28 +- src/test/java/org/nuiton/util/StringUtilTest.java | 14 +- .../org/nuiton/util/TransparenteReferenceTest.java | 18 +- src/test/java/org/nuiton/util/VersionTest.java | 11 +- src/test/java/org/nuiton/util/VersionUtilTest.java | 2 +- src/test/java/org/nuiton/util/ZipUtilTest.java | 26 +- src/test/java/org/nuiton/util/beans/BeanC.java | 2 +- .../org/nuiton/util/beans/BeanMonitorTest.java | 4 +- .../java/org/nuiton/util/beans/BeanUtilTest.java | 2 +- .../org/nuiton/util/beans/BinderFactoryTest.java | 2 +- .../nuiton/util/beans/BinderModelBuilderTest.java | 20 +- .../java/org/nuiton/util/beans/BinderTest.java | 12 +- .../nuiton/util/converter/ConverterUtilTest.java | 2 +- .../util/converter/UnregistreableConverter.java | 2 +- .../util/converter/VersionConverterTest.java | 2 +- .../java/org/nuiton/util/rmi/AnyException.java | 2 +- .../nuiton/util/rmi/RmiExporterAndProxyTest.java | 3 +- src/test/java/org/nuiton/util/rmi/SomeBean.java | 2 +- src/test/java/org/nuiton/util/rmi/SomeService.java | 2 +- .../java/org/nuiton/util/rmi/SomeServiceImpl.java | 2 +- .../java/org/nuiton/util/version/SemVerTest.java | 24 +- .../resources/org/nuiton/util/fileUtilData.txt | 18 +- 117 files changed, 1285 insertions(+), 1254 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git commit 5dd42a84a6ff17c5b770e168bc4923789a14b6ef Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:01:42 2016 +0100 First pass to fix javadoc syntax (See #3797) --- src/main/java/org/nuiton/util/AliasMap.java | 14 +-- src/main/java/org/nuiton/util/ArrayUtil.java | 13 +- src/main/java/org/nuiton/util/BoundedList.java | 17 +-- .../util/BoundedListOutOfBoundsException.java | 4 +- src/main/java/org/nuiton/util/CallAnalyse.java | 56 +++++---- .../java/org/nuiton/util/CardinalityHelper.java | 34 ++--- .../org/nuiton/util/CategorisedListenerSet.java | 4 +- src/main/java/org/nuiton/util/ClassLoaderUtil.java | 6 +- src/main/java/org/nuiton/util/CollectionUtil.java | 41 +++--- src/main/java/org/nuiton/util/DateUtil.java | 3 +- src/main/java/org/nuiton/util/DesktopUtil.java | 8 +- src/main/java/org/nuiton/util/DigestGenerator.java | 4 +- .../nuiton/util/FasterCachedResourceResolver.java | 15 +-- src/main/java/org/nuiton/util/FileUtil.java | 50 ++++---- src/main/java/org/nuiton/util/GZUtil.java | 2 +- src/main/java/org/nuiton/util/GZUtilException.java | 2 +- src/main/java/org/nuiton/util/HashList.java | 4 +- src/main/java/org/nuiton/util/LRUMapMultiKey.java | 16 +-- src/main/java/org/nuiton/util/ListenerSet.java | 4 +- .../java/org/nuiton/util/LoggingException.java | 2 +- .../org/nuiton/util/LoggingPatternFormatter.java | 28 +++-- src/main/java/org/nuiton/util/MD5InputStream.java | 4 +- src/main/java/org/nuiton/util/MatrixMap.java | 140 ++++++++++----------- src/main/java/org/nuiton/util/MonthEnum.java | 2 +- src/main/java/org/nuiton/util/NumberUtil.java | 2 +- src/main/java/org/nuiton/util/ObjectUtil.java | 35 +++--- src/main/java/org/nuiton/util/PagerBean.java | 4 +- src/main/java/org/nuiton/util/PagerBeanUtil.java | 6 +- src/main/java/org/nuiton/util/PeriodDates.java | 5 +- .../util/PropertiesDateRemoveFilterStream.java | 6 +- .../java/org/nuiton/util/RecursiveProperties.java | 6 +- src/main/java/org/nuiton/util/ReflectUtil.java | 33 +++-- src/main/java/org/nuiton/util/Resource.java | 38 +++--- .../java/org/nuiton/util/ResourceException.java | 2 +- .../org/nuiton/util/ResourceNotFoundException.java | 2 +- .../java/org/nuiton/util/ResourceResolver.java | 39 +++--- .../java/org/nuiton/util/ReverseFileReader.java | 3 +- src/main/java/org/nuiton/util/SemVer.java | 47 ++++--- .../java/org/nuiton/util/SortedProperties.java | 4 +- src/main/java/org/nuiton/util/StringUtil.java | 44 +++---- src/main/java/org/nuiton/util/TimeLog.java | 15 +-- .../org/nuiton/util/TransparenteSoftReference.java | 2 +- .../org/nuiton/util/TransparenteWeakReference.java | 4 +- src/main/java/org/nuiton/util/Version.java | 37 +++--- src/main/java/org/nuiton/util/VersionUtil.java | 50 ++++---- src/main/java/org/nuiton/util/ZipUtil.java | 43 ++++--- .../java/org/nuiton/util/beans/BeanMonitor.java | 18 +-- src/main/java/org/nuiton/util/beans/BeanUtil.java | 4 +- src/main/java/org/nuiton/util/beans/Binder.java | 26 ++-- .../java/org/nuiton/util/beans/BinderFactory.java | 28 ++--- .../org/nuiton/util/beans/BinderModelBuilder.java | 35 +++--- .../org/nuiton/util/beans/InstanceFactory.java | 4 +- .../java/org/nuiton/util/beans/PropertyDiff.java | 2 +- .../java/org/nuiton/util/beans/package-info.java | 14 +-- .../org/nuiton/util/converter/ColorConverter.java | 4 +- .../org/nuiton/util/converter/ConverterUtil.java | 10 +- .../org/nuiton/util/converter/EnumConverter.java | 6 +- .../org/nuiton/util/converter/FormatConverter.java | 14 +-- .../util/converter/FormatConverterFactory.java | 7 +- .../java/org/nuiton/util/converter/FormatMap.java | 11 +- .../nuiton/util/converter/KeyStrokeConverter.java | 5 +- .../org/nuiton/util/converter/URIConverter.java | 2 +- .../org/nuiton/util/converter/URLConverter.java | 2 +- .../nuiton/util/converter/VersionConverter.java | 2 +- .../org/nuiton/util/converter/package-info.java | 8 +- .../util/pagination/PaginationParameter.java | 14 +-- .../org/nuiton/util/rmi/RemoteMethodExecutor.java | 2 +- .../nuiton/util/rmi/RemoteMethodExecutorImpl.java | 2 +- .../org/nuiton/util/rmi/RemoteProxyFactory.java | 6 +- .../java/org/nuiton/util/rmi/ServiceExporter.java | 2 +- .../java/org/nuiton/util/rmi/package-info.java | 6 +- src/main/java/org/nuiton/util/version/SemVer.java | 60 +++++---- src/main/java/org/nuiton/util/version/Version.java | 34 ++--- .../org/nuiton/util/version/VersionBuilder.java | 4 +- .../org/nuiton/util/version/VersionComparator.java | 28 ++--- .../org/nuiton/util/version/VersionConverter.java | 2 +- .../java/org/nuiton/util/version/Versions.java | 20 +-- src/test/java/org/nuiton/util/AliasMapTest.java | 16 ++- src/test/java/org/nuiton/util/CallAnalyseTest.java | 20 ++- .../org/nuiton/util/CardinalityHelperTest.java | 2 +- .../nuiton/util/CategorisedListenerSetTest.java | 18 +-- .../java/org/nuiton/util/CollectionUtilTest.java | 2 +- src/test/java/org/nuiton/util/FileUtilTest.java | 16 ++- .../java/org/nuiton/util/LRUMapMultiKeyTest.java | 19 +-- src/test/java/org/nuiton/util/ListenerSetTest.java | 2 +- .../java/org/nuiton/util/MD5InputStreamTest.java | 2 +- src/test/java/org/nuiton/util/MatrixMapTest.java | 7 +- src/test/java/org/nuiton/util/NumberUtilTest.java | 2 +- src/test/java/org/nuiton/util/ObjectUtilTest.java | 44 +++---- .../java/org/nuiton/util/PagerBeanUtilTest.java | 2 +- .../org/nuiton/util/RecursivePropertiesTest.java | 11 +- src/test/java/org/nuiton/util/ReflectUtilTest.java | 2 +- src/test/java/org/nuiton/util/ResourceTest.java | 2 +- .../org/nuiton/util/ReverseFileReaderTest.java | 12 +- src/test/java/org/nuiton/util/SemVerTest.java | 28 ++--- src/test/java/org/nuiton/util/StringUtilTest.java | 14 +-- .../org/nuiton/util/TransparenteReferenceTest.java | 18 +-- src/test/java/org/nuiton/util/VersionTest.java | 11 +- src/test/java/org/nuiton/util/VersionUtilTest.java | 2 +- src/test/java/org/nuiton/util/ZipUtilTest.java | 26 ++-- src/test/java/org/nuiton/util/beans/BeanC.java | 2 +- .../org/nuiton/util/beans/BeanMonitorTest.java | 4 +- .../java/org/nuiton/util/beans/BeanUtilTest.java | 2 +- .../org/nuiton/util/beans/BinderFactoryTest.java | 2 +- .../nuiton/util/beans/BinderModelBuilderTest.java | 20 +-- .../java/org/nuiton/util/beans/BinderTest.java | 12 +- .../nuiton/util/converter/ConverterUtilTest.java | 2 +- .../util/converter/UnregistreableConverter.java | 2 +- .../util/converter/VersionConverterTest.java | 2 +- .../java/org/nuiton/util/rmi/AnyException.java | 2 +- .../nuiton/util/rmi/RmiExporterAndProxyTest.java | 3 +- src/test/java/org/nuiton/util/rmi/SomeBean.java | 2 +- src/test/java/org/nuiton/util/rmi/SomeService.java | 2 +- .../java/org/nuiton/util/rmi/SomeServiceImpl.java | 2 +- .../java/org/nuiton/util/version/SemVerTest.java | 24 ++-- .../resources/org/nuiton/util/fileUtilData.txt | 18 +-- 116 files changed, 784 insertions(+), 877 deletions(-) diff --git a/src/main/java/org/nuiton/util/AliasMap.java b/src/main/java/org/nuiton/util/AliasMap.java index a396278..b690dc1 100644 --- a/src/main/java/org/nuiton/util/AliasMap.java +++ b/src/main/java/org/nuiton/util/AliasMap.java @@ -23,16 +23,17 @@ package org.nuiton.util; */ +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.map.MultiValueMap; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.UUID; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.map.MultiValueMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; /** * Une map base sur une HashMap qui permet pour une valeur d'ajouter d'autres @@ -51,13 +52,12 @@ import org.apache.commons.logging.LogFactory; * Si la cle ne vous importe que peu, vous pouvez par exemple utiliser * {@link UUID#randomUUID()} pour generer une cle unique. * - * @author poussin - * @version $Revision$ + * @author Benjamin Poussin - poussin@codelutin.com * @since 3.6.9 */ public class AliasMap<K, V, A> extends HashMap<K, V> { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** Logger. */ static private Log log = LogFactory.getLog(AliasMap.class); private static final long serialVersionUID = 1L; diff --git a/src/main/java/org/nuiton/util/ArrayUtil.java b/src/main/java/org/nuiton/util/ArrayUtil.java index 2f310fa..3e9731d 100644 --- a/src/main/java/org/nuiton/util/ArrayUtil.java +++ b/src/main/java/org/nuiton/util/ArrayUtil.java @@ -21,16 +21,13 @@ */ -/* * +/** * ArrayUtil.java * * Created: 31 oct. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ - * - * Mise a jour: $Date$ - * par : */ + */ package org.nuiton.util; @@ -89,12 +86,12 @@ public class ArrayUtil { // ArrayUtil /** * Retourne un nouveau tableau qui est la concatenation des deux autres. * Essai de garder pour le tableau resultat le type des tableaux en entré - * si possible. [Double], [Number] -> [Number]; [Double], [Long] -> [Object] + * si possible. [Double], [Number] → [Number]; [Double], [Long] → [Object] * * @param tabs les tableaux * @return le nouveau tableau ou null, si les deux tableaux sont null - * todo essayer de retourner le meilleur type de tableau possible - * [Double], [Long] -> [Number] + * todo essayer de retourner le meilleur type de tableau possible + * [Double], [Long] → [Number] */ public static Object[] concat(Object[]... tabs) { Object[] result = null; diff --git a/src/main/java/org/nuiton/util/BoundedList.java b/src/main/java/org/nuiton/util/BoundedList.java index 4366f29..929beb0 100644 --- a/src/main/java/org/nuiton/util/BoundedList.java +++ b/src/main/java/org/nuiton/util/BoundedList.java @@ -20,17 +20,6 @@ * #L% */ - -/* * -* BoundedList.java -* -* Created: 30 mai 2005 -* -* @author Arnaud Thimel <thimel@codelutin.com> -* @version $Revision$ -*/ - - package org.nuiton.util; import java.util.ArrayList; @@ -39,11 +28,11 @@ import java.util.Collection; /** * ArrayList with minimum and maximum sizes. For each operation, the size is * checked and the BoundedList to ensure that it is kept in the range. - * <p/> + * * Created: 10 juin 2005 * - * @author athimel <thimel@codelutin.com> - * $Id$ + * @author Arnaud Thimel - thimel@codelutin.com + * */ public class BoundedList<E> extends ArrayList<E> { /** */ diff --git a/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java b/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java index 537c7a6..3743ba3 100644 --- a/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java +++ b/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java @@ -25,8 +25,8 @@ * * Created: 30 mai 2005 * -* @author Arnaud Thimel <thimel@codelutin.com> -* @version $Revision$ +* @author Arnaud Thimel - thimel@codelutin.com +* */ diff --git a/src/main/java/org/nuiton/util/CallAnalyse.java b/src/main/java/org/nuiton/util/CallAnalyse.java index 5fd4bad..2819fcd 100644 --- a/src/main/java/org/nuiton/util/CallAnalyse.java +++ b/src/main/java/org/nuiton/util/CallAnalyse.java @@ -20,18 +20,6 @@ * #L% */ - -/* * - * CallAnalyse.java - * - * Created: 25 ao�t 2005 14:09:22 CEST - * - * @author Benjamin POUSSIN <poussin@codelutin.com> - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import org.apache.commons.collections.primitives.ArrayLongList; @@ -48,19 +36,25 @@ import java.util.TreeMap; * Cette classe permet de faire des analyses sur les appels de methode * En debut de methode on appelle la methode {@link #enter}, et en fin de methode * la methode {@link #exit}. - * <p/> + * <p> * Ensuite on peut récuperer les statistiques par Thread ou de tous les threads - * <p/> + * <p> * On a comme statistique + * <ul> * <li> le temps d'execution * <li> la memore utilisé * <li> le nombre d'appels + * </ul> * + * @author Benjamin Poussin - poussin@codelutin.com * @see TimeLog + * Created: 25 aout 2005 14:09:22 CEST */ public class CallAnalyse { // CallAnalyse - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(CallAnalyse.class); static private List<ThreadStatistics> listThreadStatistics = @@ -76,12 +70,16 @@ public class CallAnalyse { // CallAnalyse } }; - /** Permet d'activer les statistiques, pour le thread courant */ + /** + * Permet d'activer les statistiques, pour le thread courant + */ public static void activate() { stats.get().setActivated(true); } - /** Permet de desactiver les statistiques, pour le thread courant */ + /** + * Permet de desactiver les statistiques, pour le thread courant + */ public static void desactivate() { stats.get().setActivated(false); } @@ -94,7 +92,9 @@ public class CallAnalyse { // CallAnalyse return stats.get().getActivated(); } - /** @param name le nom de l'appel a monitorer */ + /** + * @param name le nom de l'appel a monitorer + */ public static void enter(String name) { ThreadStatistics t = stats.get(); if (t.getActivated()) { @@ -115,12 +115,16 @@ public class CallAnalyse { // CallAnalyse } } - /** @return the statistics for the current thread */ + /** + * @return the statistics for the current thread + */ public static ThreadStatistics getThreadStatistics() { return stats.get(); } - /** @return the statistics for all threads */ + /** + * @return the statistics for all threads + */ public static List<ThreadStatistics> getAllThreadStatistics() { return listThreadStatistics; } @@ -198,7 +202,9 @@ public class CallAnalyse { // CallAnalyse protected long sumMemory = 0; - /** pile contenant le temps de appel, util pour les appels recursifs */ + /** + * pile contenant le temps de appel, util pour les appels recursifs + */ protected ArrayLongList times = new ArrayLongList(); protected ArrayLongList memories = new ArrayLongList(); @@ -298,10 +304,10 @@ public class CallAnalyse { // CallAnalyse @Override public String toString() { return getName() + " calls=" + getCalls() - + " time=" + StringUtil.convertTime(getSumTime()) - + "(" + StringUtil.convertTime(getMinTime()) + "/" + StringUtil.convertTime(getAvgTime()) + "/" + StringUtil.convertTime(getMaxTime()) + ")" - + " memory=" + StringUtil.convertMemory(getSumMemory()) - + "(" + StringUtil.convertMemory(getMinMemory()) + "/" + StringUtil.convertMemory(getAvgMemory()) + "/" + StringUtil.convertMemory(getMaxMemory()) + ")" + + " time=" + StringUtil.convertTime(getSumTime()) + + "(" + StringUtil.convertTime(getMinTime()) + "/" + StringUtil.convertTime(getAvgTime()) + "/" + StringUtil.convertTime(getMaxTime()) + ")" + + " memory=" + StringUtil.convertMemory(getSumMemory()) + + "(" + StringUtil.convertMemory(getMinMemory()) + "/" + StringUtil.convertMemory(getAvgMemory()) + "/" + StringUtil.convertMemory(getMaxMemory()) + ")" ; } diff --git a/src/main/java/org/nuiton/util/CardinalityHelper.java b/src/main/java/org/nuiton/util/CardinalityHelper.java index ae6957c..9e71477 100644 --- a/src/main/java/org/nuiton/util/CardinalityHelper.java +++ b/src/main/java/org/nuiton/util/CardinalityHelper.java @@ -27,33 +27,33 @@ import java.util.regex.Pattern; /** * Une classe avec des méthodes utiles sur les cardinalités : - * <p/> + * * parser une cardinalité {@link #parseCardinalite(String, boolean)} - * <p/> + * * afficher une cardinité {@link #printCardinalite(StringBuilder, String, int, int, boolean, String, String, String, String)} - * <p/> + * * et pour tester des cardinalités : - * <p/> + * * {@link #isMandatory(int)}, savoir si une cardinalité est obligatoire à * partir de son min. - * <p/> + * * {@link #isRepetable(int)}, savoir si une cardinalité est répétable à partir * de son max. - * <p/> + * * {@link #isMaxBounded(int)}, savoir si une cardinalité est bornée sur son max * à partir de son max. - * <p/> + * * {@link #isDefaultMandatory(int, int)}, savoir si la cardinalité est la * cardinalité obligatoire par défaut {1}. - * <p/> + * * {@link #isDefaultOptional(int, int)}, savoir si la cardinalité est la * cardinalité optionel par défaut {0,1}. - * <p/> + * * {@link #isAvailable(int, int)}, savoir si il reste encore des occurrences * disponibles sur une cardianlité à partir d'un nombre d'oocurrence et du max * de la cardinalité. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public class CardinalityHelper { @@ -75,7 +75,7 @@ public class CardinalityHelper { * * @param min le min de la cardinalité à tester * @param max le max de la cardinalité à tester - * @return <code>true</code> si min==1 et max=1 + * @return {@code true} si min==1 et max=1 */ public static boolean isDefaultMandatory(int min, int max) { return min == 1 && max == 1; @@ -86,7 +86,7 @@ public class CardinalityHelper { * * @param min le min de la cardinalité à tester * @param max le max de la cardinalité à tester - * @return <code>true</code> si min==0 && max==1 + * @return {@code true} si min==0 && max==1 */ public static boolean isDefaultOptional(int min, int max) { return min == 0 && max == 1; @@ -96,7 +96,7 @@ public class CardinalityHelper { * Indique si une cardinalité est obligatoire à partir de son min * * @param min le min de la cardinalité à tester - * @return <code>true</code> if min>0 + * @return {@code true} if min>0 */ public static boolean isMandatory(int min) { return min > 0; @@ -106,7 +106,7 @@ public class CardinalityHelper { * Indique si une cardinalité est majorée à partir de son max * * @param max le max de la cardinalité à tester - * @return <code>true</code> si max!=-1 + * @return {@code true} si max≠-1 */ public static boolean isMaxBounded(int max) { return max != -1; @@ -116,7 +116,7 @@ public class CardinalityHelper { * Indique si une cardinalité est répétable à partir de son max * * @param max le max de la cardinalité à tester - * @return <code>true</code> si max>0 || max==-1 + * @return {@code true} si max>0 || max==-1 */ public static boolean isRepetable(int max) { return !isMaxBounded(max) || max > 1; @@ -128,7 +128,7 @@ public class CardinalityHelper { * * @param current le nombre d'occurence actuel * @param max la borne max de la cardinalité - * @return <code>true</code> si la cardinalité n'a pas atteint sa borne max + * @return {@code true} si la cardinalité n'a pas atteint sa borne max */ public static boolean isAvailable(int current, int max) { @@ -140,7 +140,7 @@ public class CardinalityHelper { * obligatoire ou non. * * @param mandatory le critère à tester - * @return <code>1</code> si obligatoire, 0 sinon. + * @return {@code 1} si obligatoire, 0 sinon. */ public static int getDefaultMin(boolean mandatory) { return mandatory ? 1 : 0; diff --git a/src/main/java/org/nuiton/util/CategorisedListenerSet.java b/src/main/java/org/nuiton/util/CategorisedListenerSet.java index 3def6a5..0d5f13d 100644 --- a/src/main/java/org/nuiton/util/CategorisedListenerSet.java +++ b/src/main/java/org/nuiton/util/CategorisedListenerSet.java @@ -28,7 +28,7 @@ * * @author Benjamin Poussin <poussin@codelutin.com> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ @@ -54,7 +54,7 @@ import java.util.WeakHashMap; * Si cette classe est la derniere classe a conserver l'objet categorie * alors la categorie est libere et ainsi que les listeners si c'etait aussi * leur derniers referencements - * <p/> + * * <p> Si les categories sont representees par des Class, alors vous pouvez * utiliser la hierachie de classe pour creer de facon automatique les peres. * diff --git a/src/main/java/org/nuiton/util/ClassLoaderUtil.java b/src/main/java/org/nuiton/util/ClassLoaderUtil.java index 6d3b046..d305232 100644 --- a/src/main/java/org/nuiton/util/ClassLoaderUtil.java +++ b/src/main/java/org/nuiton/util/ClassLoaderUtil.java @@ -36,7 +36,7 @@ import java.util.Stack; /** * A usefull class with method for ClassLoader * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public class ClassLoaderUtil { @@ -46,7 +46,7 @@ public class ClassLoaderUtil { /** * Returns the all urls to be used in a {@link URLClassLoader}. - * <p/> + * * If classloader has only one url and the url is a jar, try to load in * manifest class-path. * @@ -95,7 +95,7 @@ public class ClassLoaderUtil { /** * Recupere la liste des urls d'un {@link URLClassLoader}. - * <p/> + * * Note : Un cas particulier est positionné pour JBoss qui utilise * la method getAllURLs. * diff --git a/src/main/java/org/nuiton/util/CollectionUtil.java b/src/main/java/org/nuiton/util/CollectionUtil.java index cca8de9..7cf792e 100644 --- a/src/main/java/org/nuiton/util/CollectionUtil.java +++ b/src/main/java/org/nuiton/util/CollectionUtil.java @@ -20,17 +20,6 @@ * #L% */ -/* * - * CollectionUtil.java - * - * Created: 23 févr. 2006 09:03:39 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import java.util.Arrays; @@ -40,7 +29,11 @@ import java.util.List; import java.util.Set; -/** @author poussin */ +/** + * Created: 23 févr. 2006 09:03:39 + * + * @author Benjamin Poussin - poussin@codelutin.com + */ public class CollectionUtil { @@ -71,11 +64,11 @@ public class CollectionUtil { /** * Permet de convertir une liste non typée, en une liste typée. - * <p/> + * <p> * La liste en entrée en juste bien castée. - * <p/> + * <p> * On effectue une vérification sur le typage des élements de la liste. - * <p/> + * <p> * Note : <b>Aucune liste n'est créee, ni recopiée</b> * * @param list la liste à convertir @@ -94,7 +87,7 @@ public class CollectionUtil { if (!type.isAssignableFrom(o.getClass())) { throw new IllegalArgumentException( "can not cast List with object of type " + - o.getClass() + " to " + type + " type!"); + o.getClass() + " to " + type + " type!"); } } return (List<O>) list; @@ -102,11 +95,11 @@ public class CollectionUtil { /** * Permet de convertir une collection non typée, en une collection typée. - * <p/> + * <p> * La collection en entrée en juste bien castée. - * <p/> + * <p> * On effectue une vérification sur le typage des élements de la collection. - * <p/> + * <p> * Note : <b>Aucune collection n'est créee, ni recopiée</b> * * @param list la collection à convertir @@ -125,7 +118,7 @@ public class CollectionUtil { if (!type.isAssignableFrom(o.getClass())) { throw new IllegalArgumentException( "can not cast Collection with object of type " + - o.getClass() + " to " + type + " type!"); + o.getClass() + " to " + type + " type!"); } } return (Collection<O>) list; @@ -133,11 +126,11 @@ public class CollectionUtil { /** * Permet de convertir un ensemble non typée, en un ensemble typée. - * <p/> + * <p> * L'ensemble en entrée en juste bien castée. - * <p/> + * <p> * On effectue une vérification sur le typage des élements de la collection. - * <p/> + * <p> * Note : <b>Aucun ensemble n'est créee, ni recopiée</b> * * @param list l'ensemble à convertir @@ -156,7 +149,7 @@ public class CollectionUtil { if (!type.isAssignableFrom(o.getClass())) { throw new IllegalArgumentException( "can not cast Set with object of type " + - o.getClass() + " to " + type + " type!"); + o.getClass() + " to " + type + " type!"); } } return (Set<O>) list; diff --git a/src/main/java/org/nuiton/util/DateUtil.java b/src/main/java/org/nuiton/util/DateUtil.java index 9cc9026..860985d 100644 --- a/src/main/java/org/nuiton/util/DateUtil.java +++ b/src/main/java/org/nuiton/util/DateUtil.java @@ -32,11 +32,10 @@ import java.util.Locale; /** * Library for manipulating dates. - * <p/> + * * <b>Note: </b> * * @author fdesbois - * @version $Id$ * @since 1.4.1 */ public class DateUtil { diff --git a/src/main/java/org/nuiton/util/DesktopUtil.java b/src/main/java/org/nuiton/util/DesktopUtil.java index cc92c60..8634b64 100644 --- a/src/main/java/org/nuiton/util/DesktopUtil.java +++ b/src/main/java/org/nuiton/util/DesktopUtil.java @@ -32,7 +32,7 @@ import java.net.URI; /** * Utility class for methods to interact with Desktop Environment * - * @author jcouteau + * @author Jean Couteau - couteau@codelutin.com * @since 2.4.3 */ public class DesktopUtil { @@ -44,7 +44,7 @@ public class DesktopUtil { * Method to open an URI in the user default web browser. It uses the Java * Desktop API on Windows and Gnome environment and xdg-open on other * platforms (non-gnome linux distribution for example). - * <p/> + * * A Bug report have been opened in 2006 so that java.awt.Desktop can * support all environments but it is not fixed yet : * http://bugs.sun.com/view_bug.do?bug_id=6486393 this utility method should @@ -86,7 +86,7 @@ public class DesktopUtil { * Method to open an URI in the user default open client. It uses the Java * Desktop API on Windows and Gnome environment and xdg-open on other * platforms (non-gnome linux distribution for example). - * <p/> + * * A Bug report have been opened in 2006 so that java.awt.Desktop can * support all environments but it is not fixed yet : * http://bugs.sun.com/view_bug.do?bug_id=6486393 this utility method should @@ -131,7 +131,7 @@ public class DesktopUtil { * Method to open an URI in the user default mail client. It uses the Java * Desktop API on Windows and Gnome environment and xdg-email on other * platforms (non-gnome linux distribution for example). - * <p/> + * * A Bug report have been opened in 2006 so that java.awt.Desktop can * support all environments but it is not fixed yet : * http://bugs.sun.com/view_bug.do?bug_id=6486393 this utility method should diff --git a/src/main/java/org/nuiton/util/DigestGenerator.java b/src/main/java/org/nuiton/util/DigestGenerator.java index a92ada4..15f2eb6 100644 --- a/src/main/java/org/nuiton/util/DigestGenerator.java +++ b/src/main/java/org/nuiton/util/DigestGenerator.java @@ -1,7 +1,7 @@ /* * Nuiton Utils %%Ignore-License * - * $Id$ + * * $HeadURL$ * * Licensed to the Apache Software Foundation (ASF) under one @@ -54,7 +54,7 @@ import java.util.TreeMap; /** * Helper class to provide the functionality of the digest value generation. This is an implementation of the DHASH * algorithm on . - * <p/> + * * TODO tchemit 2010-08-25 : This class is a nightmare ? we talk about digest mixed with dom nodes ? * TODO tchemit 2010-08-25 : Should have more to explain the purpose (javadoc, author, since...) or (rename | split) this class. */ diff --git a/src/main/java/org/nuiton/util/FasterCachedResourceResolver.java b/src/main/java/org/nuiton/util/FasterCachedResourceResolver.java index 21f57be..ecd059d 100644 --- a/src/main/java/org/nuiton/util/FasterCachedResourceResolver.java +++ b/src/main/java/org/nuiton/util/FasterCachedResourceResolver.java @@ -30,16 +30,17 @@ import javax.xml.transform.stream.StreamSource; import java.net.URL; /** - * FasterCachedResourceResolver is a URIResolver using a optimized search time algorithm. <br/> + * FasterCachedResourceResolver is a URIResolver using a optimized search time algorithm. + * <p> * For a given href, will try to search the exact path in classp-ath in the exact directory META-INF/cache. - * <p/> + * </p> * The fact of using META-INF directory is optimized (special jvm directory). - * <p/> + * * The other fact of using an exact directory makes also decrease dramaticly time search. - * <p/> + * * Finally, we spend ten times less time in searching; moreover using the path of * searched resource resolve the probleme of name colision and this is also a good thing... - * <p/> + * * Exemple : * <pre> * href = http://foo/bar/file.txt @@ -47,10 +48,6 @@ import java.net.URL; * </pre> * * @author chorlet - * @version $Revision$ - * <p/> - * Last update : $Date$ - * By : */ public class FasterCachedResourceResolver extends ResourceResolver { diff --git a/src/main/java/org/nuiton/util/FileUtil.java b/src/main/java/org/nuiton/util/FileUtil.java index e430719..0221cba 100644 --- a/src/main/java/org/nuiton/util/FileUtil.java +++ b/src/main/java/org/nuiton/util/FileUtil.java @@ -66,11 +66,11 @@ import java.util.regex.Pattern; * temporaire, comparaison de dates de création, récupération d'une chaîne, * d'un Reader ou d'un Writer à partir d'un fichier, récupération du fichier * saisi dans une boîte de dialogue, conversions en byte[], en Stream... - * <p/> + * * Created: 22 novembre 2004 * - * @author bpoussin <poussin@codelutin.com> - * @author tchemit <chemit@codelutin.com> + * @author Benjamin Poussin - poussin@codelutin.com + * @author Tony Chemit - chemit@codelutin.com */ public class FileUtil { // FileUtil @@ -557,7 +557,7 @@ public class FileUtil { // FileUtil /** * Equivalent de la methode basename unix. - * basename("/tmp/toto.xml", ".xml") -> "toto" + * basename("/tmp/toto.xml", ".xml") → "toto" * * @param file le fichier dont on souhaite le nom sans le chemin * @param suffixes si present represente le suffixe a eliminer du fichier @@ -571,7 +571,7 @@ public class FileUtil { // FileUtil /** * Equivalent de la methode basename unix. - * basename("/tmp/toto.xml", ".xml") -> "toto" + * basename("/tmp/toto.xml", ".xml") → "toto" * * @param name le nom du fichier dont on souhaite le nom sans le chemin * @param suffixes si present represente le suffixe a eliminer du fichier @@ -850,7 +850,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp") donnera le repertoire * "/var/tmp/titi" * @@ -868,7 +868,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -897,7 +897,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -935,7 +935,7 @@ public class FileUtil { // FileUtil if (renameFrom != null && renameTo != null) { String tmp = path.replaceAll(renameFrom, renameTo); if (log.isDebugEnabled()) { - log.debug("rename " + path + " -> " + tmp); + log.debug("rename " + path + " → " + tmp); } path = tmp; } @@ -981,7 +981,7 @@ public class FileUtil { // FileUtil /** * @param file le fichier à tester. * @param includePatterns les patterns pour accepeter le fichier depuis son nom - * @return <code>true</code> si le fichier est accepté, <code>false> autrement. + * @return {@code true} si le fichier est accepté, <code>false> autrement. */ private static boolean copyRecursivelyAccept(File file, String[] includePatterns) { @@ -999,9 +999,9 @@ public class FileUtil { // FileUtil /** * Use the linePattern to break the given CharBuffer into lines, applying * the input pattern to each line to see if we have a match - * <p/> + * * Code taken from : - * <p/> + * * http://java.sun.com/javase/6/docs/technotes/guides/io/example/Grep.java * * @param regex regex to search into file @@ -1046,11 +1046,11 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix grep command. - * <p/> + * * Code taken from : - * <p/> + * * http://java.sun.com/javase/6/docs/technotes/guides/io/example/Grep.java - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1101,7 +1101,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix grep command. - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1131,7 +1131,7 @@ public class FileUtil { // FileUtil /** * Search for files matching regex in current directory. - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1154,9 +1154,9 @@ public class FileUtil { // FileUtil /** * Sed implementation for a single file. - * <p/> + * * Oginal source code from http://kickjava.com/src/org/apache/lenya/util/SED.java.htm. - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1208,7 +1208,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix sed command. - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1233,7 +1233,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix sed command. - * <p/> + * * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1271,7 +1271,7 @@ public class FileUtil { // FileUtil /** * Obtain a file from the given {@code rootDirectory}, applying given paths. - * <p/> + * * For example with paths = a, b and c, then result is : * <pre> * root/a/b/c @@ -1292,7 +1292,7 @@ public class FileUtil { // FileUtil /** * Obtain a file fro the given {@code rootDirectory}, applying the fqn. - * <p/> + * * For example with fqn = a.b.c, the result is : * <pre> * root/a/b/c @@ -1312,9 +1312,9 @@ public class FileUtil { // FileUtil /** * Obtain a directory and creates it if required to place some test data. - * <p/> + * * The directory will be : - * <p/> + * * <pre> * java.io.tmpdir/testclassName.fqn/methodName[/classifier]/timestamp * </pre> diff --git a/src/main/java/org/nuiton/util/GZUtil.java b/src/main/java/org/nuiton/util/GZUtil.java index a13fb79..a93d4ac 100644 --- a/src/main/java/org/nuiton/util/GZUtil.java +++ b/src/main/java/org/nuiton/util/GZUtil.java @@ -26,7 +26,7 @@ * Created: 3 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/main/java/org/nuiton/util/GZUtilException.java b/src/main/java/org/nuiton/util/GZUtilException.java index 87fb3c7..0c0c0d3 100644 --- a/src/main/java/org/nuiton/util/GZUtilException.java +++ b/src/main/java/org/nuiton/util/GZUtilException.java @@ -26,7 +26,7 @@ * Created: 3 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/main/java/org/nuiton/util/HashList.java b/src/main/java/org/nuiton/util/HashList.java index 74464fb..fe90d8e 100644 --- a/src/main/java/org/nuiton/util/HashList.java +++ b/src/main/java/org/nuiton/util/HashList.java @@ -26,7 +26,7 @@ * Created: 2 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ @@ -43,7 +43,7 @@ import java.util.HashSet; * en premier que l'objet n'est pas deja dans la liste. S'il y est * alors il n'est pas ajouter, sinon il est ajouter. * L'utilisation de la methode set n'est pas permise - * <p/> + * * FIXME: la serialisation n'est pas modifier, c-a-d que seul le tableau est * conserve et pas la hashSet, donc apres recuperation, l'uticite n'est plus * garantie. Il faut donc surcharger readObject et writeObject pour conserver diff --git a/src/main/java/org/nuiton/util/LRUMapMultiKey.java b/src/main/java/org/nuiton/util/LRUMapMultiKey.java index 834247e..23943d6 100644 --- a/src/main/java/org/nuiton/util/LRUMapMultiKey.java +++ b/src/main/java/org/nuiton/util/LRUMapMultiKey.java @@ -20,17 +20,6 @@ * #L% */ -/* * - * LRUMapMultiKey.java - * - * Created: 23 mai 2006 04:08:03 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import org.apache.commons.logging.Log; @@ -46,7 +35,8 @@ import java.util.Map; import java.util.Set; -/** @author poussin */ +/** Created: 23 mai 2006 04:08:03 + * @author Benjamin Poussin - poussin@codelutin.com */ public class LRUMapMultiKey extends LinkedHashMap<LRUMapMultiKey.Key, Object> { @@ -54,7 +44,7 @@ public class LRUMapMultiKey extends LinkedHashMap<LRUMapMultiKey.Key, Object> { private static final Log log = LogFactory.getLog(LRUMapMultiKey.class); - /** @author poussin */ + /** @author Benjamin Poussin - poussin@codelutin.com */ public static class Key extends ArrayList<Object> { private static final long serialVersionUID = 1L; diff --git a/src/main/java/org/nuiton/util/ListenerSet.java b/src/main/java/org/nuiton/util/ListenerSet.java index c991afe..f703df2 100644 --- a/src/main/java/org/nuiton/util/ListenerSet.java +++ b/src/main/java/org/nuiton/util/ListenerSet.java @@ -27,7 +27,7 @@ * * @author Benjamin Poussin <poussin@codelutin.com> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ @@ -124,7 +124,7 @@ public class ListenerSet<L> implements Iterable<L> { // ListenerSet /** * Appele la méthode du listener sans argument. - * <p/> + * * Cette méthode echoue si la methode ou l'objet contenant la methode a * appeler n'est pas public. * diff --git a/src/main/java/org/nuiton/util/LoggingException.java b/src/main/java/org/nuiton/util/LoggingException.java index b244074..1877c7e 100644 --- a/src/main/java/org/nuiton/util/LoggingException.java +++ b/src/main/java/org/nuiton/util/LoggingException.java @@ -27,7 +27,7 @@ * * @author POUSSIN Benjamin <bpoussin@free.fr> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/main/java/org/nuiton/util/LoggingPatternFormatter.java b/src/main/java/org/nuiton/util/LoggingPatternFormatter.java index 8a80d94..2e76cb5 100644 --- a/src/main/java/org/nuiton/util/LoggingPatternFormatter.java +++ b/src/main/java/org/nuiton/util/LoggingPatternFormatter.java @@ -27,7 +27,7 @@ * * @author POUSSIN Benjamin <bpoussin@free.fr> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : $Author$ @@ -48,20 +48,21 @@ import java.util.logging.LogRecord; /** * Classe org.nuiton.logging.PatternFormatter. - * <p/> + * * <ul> * <li>n: new line</li> * <li>%: %</li> * <li>{: {</li> * </ul> - * <p/> + * * <ul> * <li>d: date</li> * </ul> - * <p/> + * * Date follow the same pattern as DateFormat. - * <p/> - * <ul> Sized + * + * Sized + * <ul> * <li>o: free memory</li> * <li>O: total memory</li> * <li>t: thread id</li> @@ -71,23 +72,24 @@ import java.util.logging.LogRecord; * <li>a: argument</li> * <li>e: exception</li> * </ul> - * <p/> + * * Sized element support justify pattern. - * {[+|-]<size>[:<maxPos>]}. + * {[+|-]<size>[:<maxPo>>]}. * '+' is * left justify, '-' rigth justify, size the prefered size for the element if it is not bigger. * If maxPos option is present blanc is not add if it go up to maxPos. - * <p/> - * <ul> SubString + * + * SubString + * <ul> * <li>M: method name</li> * </ul> - * <p/> + * * L'element SubString a les memes possibilites que le pattern justify, * et permet en plus de suprimer une sous chaine, * cela permet de supprimer le debut du nom d'une classe. * Syntaxe : - * {*<substring>|[+|-]<size>[:<maxPos>]} - * {<substring>*|[+|-]<size>[:<maxPos>]} + * {*<substring>|[+|-]<size>[:<maxPos>]} + * {<substring>*|[+|-]<size>[:<maxPos>]} * L'etoile represente le texte qui restera. */ public class LoggingPatternFormatter extends Formatter { // PatternFormatter diff --git a/src/main/java/org/nuiton/util/MD5InputStream.java b/src/main/java/org/nuiton/util/MD5InputStream.java index 7e5c776..e3e0752 100644 --- a/src/main/java/org/nuiton/util/MD5InputStream.java +++ b/src/main/java/org/nuiton/util/MD5InputStream.java @@ -41,7 +41,7 @@ import static org.nuiton.i18n.I18n.t; * MD5InputStream, a subclass of FilterInputStream implementing MD5 * functionality on a stream. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public class MD5InputStream extends DigestInputStream { @@ -62,7 +62,7 @@ public class MD5InputStream extends DigestInputStream { /** * Compute the MD5 for the given {@code input}. - * <p/> + * * <b>Note:</b> The the stream will be closed after calling the method * even if something was wrong. * diff --git a/src/main/java/org/nuiton/util/MatrixMap.java b/src/main/java/org/nuiton/util/MatrixMap.java index 4907093..7c4af59 100644 --- a/src/main/java/org/nuiton/util/MatrixMap.java +++ b/src/main/java/org/nuiton/util/MatrixMap.java @@ -45,7 +45,7 @@ import java.util.RandomAccess; * Si lors de l'ajout on indique une dimension qui n'existe pas encore ou * un element dans une dimension qui n'existe pas, la matrice ajoute * automatiquement les elements manquant pour que l'ajout se passe bien. - * <p/> + * * MatrixMap permet de stocker les elements avec des cles de n'importe quel * type. Les coordonnees utilisant ces objets sont converti en coordonnees * numeriques qui est la seul chose que sait gere Matrix. Ces coordonnees @@ -53,21 +53,17 @@ import java.util.RandomAccess; * dans Vector. On decoupe ainsi les problemes et on minimise le stockage et * certain traitement sur les données puisqu'au final toutes les données sont * dans une simple liste. - * <p/> + * * Pour créer une nouvelle matrice, il faut utiliser une des méthodes de * {@link MatrixMap.Factory} * - * @author poussin - * @version $Revision$ + * @author Benjamin Poussin - poussin@codelutin.com * @since 2.2.1 - * <p/> - * Last update: $Date$ - * by : $Author$ */ public interface MatrixMap<E> extends Iterable<E> { /** Classe permettant la creation de matrice */ - public static class Factory { + class Factory { public static <T> MatrixMap<T> create(List... semantics) { MatrixMap<T> result = new MatrixMapFixed<T>(semantics); return result; @@ -113,7 +109,7 @@ public interface MatrixMap<E> extends Iterable<E> { } @Override - public MatrixMapIterator<E> iterator(); + MatrixMapIterator<E> iterator(); /** * Copy la matrice pour pouvoir la modifier sans perdre les donnees @@ -121,31 +117,31 @@ public interface MatrixMap<E> extends Iterable<E> { * * @return new matrix */ - public MatrixMap<E> copy(); + MatrixMap<E> copy(); - public SemanticList[] getSemantics(); + SemanticList[] getSemantics(); - public SemanticList getSemantic(int dim); + SemanticList getSemantic(int dim); - public void setSemantic(int dim, List sem); + void setSemantic(int dim, List sem); - public void setName(String name); + void setName(String name); - public String getName(); + String getName(); - public String[] getDimensionNames(); + String[] getDimensionNames(); - public void setDimensionNames(String[] names); + void setDimensionNames(String[] names); - public void setDimensionName(int dim, String name); + void setDimensionName(int dim, String name); - public String getDimensionName(int dim); + String getDimensionName(int dim); - public int getDimCount(); + int getDimCount(); - public int[] getDim(); + int[] getDim(); - public int getDim(int d); + int getDim(int d); /** * Applique sur chaque element de la matrice la fonction f @@ -154,7 +150,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @return Retourne la matrice elle meme. Les modifications sont faites directement * dessus */ - public MatrixMap<E> map(MapFunction<E> f); + MatrixMap<E> map(MapFunction<E> f); /** * Retourne l'element a une certaine position en utilisant des indices @@ -163,7 +159,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param coordinates * @return */ - public E getValueIndex(int... coordinates); + E getValueIndex(int... coordinates); /** * Modifie l'element a une certaine position en utilisant des indices @@ -172,7 +168,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param value la nouvelle valeur * @param coordinates */ - public void setValueIndex(E value, int... coordinates); + void setValueIndex(E value, int... coordinates); /** * Retourne l'element a une certaine position en utilisant les semantiques @@ -180,7 +176,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param coordinates * @return */ - public E getValue(Object... coordinates); + E getValue(Object... coordinates); /** * Modifie l'element a une certaine position en utilisant les semantiques @@ -188,7 +184,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param value la nouvelle valeur * @param coordinates */ - public void setValue(E value, Object... coordinates); + void setValue(E value, Object... coordinates); /** * Verifie que deux matrices sont completement equals @@ -197,7 +193,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param mat * @return */ - public boolean equals(MatrixMap mat); + boolean equals(MatrixMap mat); /** * Verifie si les matrices sont egales en ne regardant que les valeurs et @@ -206,14 +202,14 @@ public interface MatrixMap<E> extends Iterable<E> { * @param mat * @return equality on values */ - public boolean equalsValues(MatrixMap<E> mat); + boolean equalsValues(MatrixMap<E> mat); /** * Representation string de la matrice quelque soit le nombre de dimension * * @return */ - public String toStringGeneric(); + String toStringGeneric(); /** * Indique si les semantiques passées en argument sont valable pour la @@ -222,7 +218,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param semantics * @return */ - public boolean isValidCoordinates(Object[] semantics); + boolean isValidCoordinates(Object[] semantics); /** * Copie une matrice dans la matrice actuelle. La matrice à copier à le même @@ -232,7 +228,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param mat la matrice à copier * @return return la matrice courante. */ - public MatrixMap paste(MatrixMap<E> mat); + MatrixMap paste(MatrixMap<E> mat); /** * Permet de prendre une sous matrice dans la matrice courante. La sous @@ -241,7 +237,7 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param dim la dimension dans lequel on veut une sous matrice * @param start la position dans dim d'ou il faut partir pour prendre la - * sous matrice. 0 <= start < dim.size si start est négatif alors + * sous matrice. 0 ≤ start < dim.size si start est négatif alors * la position de départ est calculé par rapport à la fin de la * dimension, pour avoir le dernier élément il faut passer -1 * @param nb le nombre d'élément à prendre dans la dimension si nb est @@ -249,7 +245,7 @@ public interface MatrixMap<E> extends Iterable<E> { * tous les éléments jusqu'à la fin de la dimension. * @return new matrix */ - public MatrixMap<E> getSubMatrix(int dim, Object start, int nb); + MatrixMap<E> getSubMatrix(int dim, Object start, int nb); /** * Permet de prendre une sous matrice dans la matrice courante. La sous @@ -260,18 +256,18 @@ public interface MatrixMap<E> extends Iterable<E> { * @param elem les éléments dans la dimension à conserver * @return new matrix */ - public MatrixMap<E> getSubMatrix(int dim, Object... elem); + MatrixMap<E> getSubMatrix(int dim, Object... elem); /** * Permet de prendre une sous matrice dans la matrice courante. - * <p/> + * * Réalise plusieurs appels à {@link #getSubMatrix(int, Object...)} suivant * l'implémentation. * * @param elems les éléments dans la dimension à conserver * @return new matrix */ - public MatrixMap<E> getSubMatrix(Object[]... elems); + MatrixMap<E> getSubMatrix(Object[]... elems); /** * Reduit la matrice de sorte que toutes les dimensions qui n'ont qu'un @@ -281,7 +277,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @return une nouvelle matrice plus petite que la matrice actuelle ou egal * s'il n'y a aucune dimension à supprimer */ - public MatrixMap<E> reduce(); + MatrixMap<E> reduce(); /** * Reduit le matrice seulement sur les dimensions passées en argument. Si @@ -291,7 +287,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param dims les dimensions sur lequel il faut faire la reduction * @return une nouvelle matrice */ - public MatrixMap<E> reduceDims(int... dims); + MatrixMap<E> reduceDims(int... dims); /** * Reduit la matrice de sorte que toutes les dimensions qui n'ont qu'un @@ -303,7 +299,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @return une nouvelle matrice plus petite que la matrice actuelle ou egal * s'il n'y a aucune dimension à supprimer */ - public MatrixMap<E> reduce(int minNbDim); + MatrixMap<E> reduce(int minNbDim); /** * Permet de retourner une nouvelle matrice ayant les semantiques passées @@ -313,7 +309,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param sems * @return */ - public MatrixMap<E> extend(Object... sems); + MatrixMap<E> extend(Object... sems); /////////////////////////////////////////////////////////////////////////// // @@ -325,7 +321,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Classe contenant des méthodes statiques pour aider a la manipulation * des matrices */ - public static class MatrixHelper { + class MatrixHelper { /** * Mais en forme un texte pour qu'il fasse exactement la longueur @@ -435,17 +431,17 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param <E> */ - public static interface MatrixMapIterator<E> extends Iterator<E> { - public int[] getCoordinates(); + interface MatrixMapIterator<E> extends Iterator<E> { + int[] getCoordinates(); - public E getValue(); + E getValue(); - public void setValue(E value); + void setValue(E value); - public Object[] getSemanticsCoordinates(); + Object[] getSemanticsCoordinates(); } - public static class MatrixMapIteratorImpl<E> implements MatrixMapIterator<E> { // MatrixMapIteratorImpl + class MatrixMapIteratorImpl<E> implements MatrixMapIterator<E> { // MatrixMapIteratorImpl protected MatrixIterator<E> iterator = null; @@ -505,13 +501,13 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Collection particuliere utilisee pour la stockage des semantiques. - * <p/> + * * Sert a optimiser la recherche de la position d'une donnee dans la liste. * Permet aussi de verifier qu'on ajoute pas de doublon dans la liste * * @param <T> */ - public static class SemanticList<T> extends AbstractList<T> implements RandomAccess { + class SemanticList<T> extends AbstractList<T> implements RandomAccess { protected ArrayList<T> datas = null; @@ -593,22 +589,22 @@ public interface MatrixMap<E> extends Iterable<E> { * dimension qui n'existe pas, elle les ajoutes dans les semantiques. Ceci * n'est vrai que pour le set avec des semantiques, le set avec des indices * ne rend pas la matrice elastique. - * <p/> + * * Cette classe fonctionne avec une matrice interne que l'on change lorsque * l'on a besoin de modifier les dimensions. Le changement de dimension * a donc un cout (creation d'une nouvelle matrice, copie des elements) - * <p/> + * * Si on cree une sous matrice, et que l'on modifie la matrice mere * La sous matrice n'est pas impacter, puisqu'elle est base sur l'ancienne * represention interne de la matrice elastique, les deux matrices n'ont donc * plus de lien. - * <p/> + * * Les methodes reduce et extend retourne de nouvelle matrice qui ne sont * pas elastique. Si on veut qu'elle le soit, il faut les reencapsuler * * @param <E> */ - public static class MatrixMapElastic<E> implements MatrixMap<E> { + class MatrixMapElastic<E> implements MatrixMap<E> { protected MatrixMap<E> internalMatrixMap; @@ -776,8 +772,8 @@ public interface MatrixMap<E> extends Iterable<E> { * Implantation de MatrixMap dont les dimensions sont fixees a la creation * Les dimensions ne change plus par la suite */ - public static class MatrixMapFixed<E> extends AbstractMatrixMap<E> { - /** to use log facility, just put in your code: log.info(\"...\"); */ + class MatrixMapFixed<E> extends AbstractMatrixMap<E> { + /** Logger. */ static private Log log = LogFactory.getLog(MatrixMapFixed.class); protected Matrix<E> matrix = null; @@ -832,7 +828,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Modifie un element de la matrice en fonction des dimensions passé en * paramètre.<br> - * <p/> + * * Exemple: Si on a un matrice 3D.<br> * m.set(v, [1,1,1]) modifie un element de la matrice.<br> * @@ -886,9 +882,9 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param <E> */ - public static abstract class AbstractMatrixMap<E> implements MatrixMap<E> { + abstract class AbstractMatrixMap<E> implements MatrixMap<E> { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** Logger. */ static private Log log = LogFactory.getLog(AbstractMatrixMap.class); protected String name = null; @@ -1137,7 +1133,7 @@ public interface MatrixMap<E> extends Iterable<E> { * v1, v2, v3 * ] * </pre> - * <p/> + * * Si la matrice est 2D * <pre> * MaMatrice(matrix2D) [ @@ -1148,7 +1144,7 @@ public interface MatrixMap<E> extends Iterable<E> { * DimC v7, v8, v9 * ] * </pre> - * <p/> + * * Pour les autres types de matrice la methode {@link #toStringGeneric() } * est utilise * @@ -1326,7 +1322,7 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param dim la dimension dans lequel on veut une sous matrice * @param start la position dans dim d'ou il faut partir pour prendre la - * sous matrice. 0 <= start < dim.size si start est négatif alors + * sous matrice. 0 ≤ start < dim.size si start est négatif alors * la position de départ est calculé par rapport à la fin de la * dimension, pour avoir le dernier élément il faut passer -1 * @param nb le nombre d'élément à prendre dans la dimension si nb est @@ -1371,7 +1367,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de prendre une sous matrice dans la matrice courante. - * <p/> + * * Réalise plusieurs appels à {@link #getSubMatrix(int, Object...)} suivant * l'implémentation. * @@ -1411,7 +1407,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de prendre une sous matrice dans la matrice courante. - * <p/> + * * Réalise plusieurs appels a {@link #getSubMatrix(int, int[])} suivant * l'implementation. * @@ -1601,10 +1597,10 @@ public interface MatrixMap<E> extends Iterable<E> { * Pour l'instant une sous matrice a obligatoirement le meme nombre de dimension * que la matrice qu'elle contient. Elle permet juste de reduire le nombre * d'element d'une dimension. - * <p/> + * * C'est comme une "vue" réduite sur la vraie matrices. */ - public static class SubMatrix<E> extends AbstractMatrixMap<E> { // SubMatrix + class SubMatrix<E> extends AbstractMatrixMap<E> { // SubMatrix protected MatrixMap<E> matrix = null; @@ -1716,7 +1712,7 @@ public interface MatrixMap<E> extends Iterable<E> { * matrice avec la position reel de la matrice sous jacente. */ protected interface DimensionConverter extends Serializable { - public int[] convertCoordinates(int[] coordinates); + int[] convertCoordinates(int[] coordinates); } /** La conversion est juste un decalage d'indice */ @@ -1789,7 +1785,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Objet matrice qui ne permet que le stockage avec des positions int * dans une matrice a autant de dimension que l'on souhaite. */ - public static class Matrix<E> implements Iterable<E> { // BasicMatrix + class Matrix<E> implements Iterable<E> { // BasicMatrix /** Les dimensions de la matrice */ protected int[] dimensions = null; @@ -2033,7 +2029,7 @@ public interface MatrixMap<E> extends Iterable<E> { } // BasicMatrix - public static class MatrixIterator<E> implements Iterator<E> { // MatrixIteratorImpl + class MatrixIterator<E> implements Iterator<E> { // MatrixIteratorImpl protected Matrix<E> matrix = null; @@ -2086,7 +2082,7 @@ public interface MatrixMap<E> extends Iterable<E> { * de ne conserver que les elements differents de la valeur par defaut, ce qui * minimize la taille du tableau necessaire a conserver les données. */ - public static class Vector<E> { // Vector + class Vector<E> { // Vector /** maximum number of element, maximum pos value */ protected int capacity = 0; @@ -2228,7 +2224,7 @@ public interface MatrixMap<E> extends Iterable<E> { * retourne la position dans le tableau position de la position lineaire * * @param pos - * @return la position ou < 0 donnant la position de l'element s'il etait + * @return la position ou < 0 donnant la position de l'element s'il etait * present */ protected int findIndex(int pos) { @@ -2306,7 +2302,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Permet de faire un traitement sur des valeurs et d'en retourner * des nouvelles. */ - public static interface MapFunction<E> { // MapFunction + interface MapFunction<E> { // MapFunction /** * Permet de faire un traitement sur value et de retourne une nouvelle diff --git a/src/main/java/org/nuiton/util/MonthEnum.java b/src/main/java/org/nuiton/util/MonthEnum.java index 6da9346..13005d2 100644 --- a/src/main/java/org/nuiton/util/MonthEnum.java +++ b/src/main/java/org/nuiton/util/MonthEnum.java @@ -30,7 +30,7 @@ import static org.nuiton.i18n.I18n.t; /** * Une énumération pour représenter les mois d'une année. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public enum MonthEnum { diff --git a/src/main/java/org/nuiton/util/NumberUtil.java b/src/main/java/org/nuiton/util/NumberUtil.java index aabc905..5ea7e6c 100644 --- a/src/main/java/org/nuiton/util/NumberUtil.java +++ b/src/main/java/org/nuiton/util/NumberUtil.java @@ -31,7 +31,7 @@ import java.math.MathContext; import java.util.Arrays; /** - * @author kmorin <kmorin@codelutin.com> + * @author Kevin Morin - morin@codelutin.com * @since 3.0 */ public class NumberUtil { diff --git a/src/main/java/org/nuiton/util/ObjectUtil.java b/src/main/java/org/nuiton/util/ObjectUtil.java index 9d892d3..47ff77d 100644 --- a/src/main/java/org/nuiton/util/ObjectUtil.java +++ b/src/main/java/org/nuiton/util/ObjectUtil.java @@ -26,7 +26,7 @@ * Created: 2 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ @@ -59,11 +59,11 @@ import static org.nuiton.i18n.I18n.t; * Outils pour manipuler des objets. Création d'un objet à partir d'une chaîne * le décrivant, conversion d'un objet en Object, récupération de méthodes * à partir de leur nom, de constructeurs à partir de leurs paramètres... - * <p/> + * * Created: 4 novembre 2004 * - * @author bpoussin <poussin@codelutin.com> - * $Id$ + * @author Benjamin Poussin - poussin@codelutin.com + * */ public class ObjectUtil { // ObjectUtil @@ -191,11 +191,12 @@ public class ObjectUtil { // ObjectUtil * Create new object from string like org.nuiton.Toto(name=machine, int=10) * where machine and int is properties on org.nuiton.Toto object. * Conversion between 10 in string and 10 as integer as automaticaly done - * <p/> - * For String property you can use ex: - * <li> name="my string with , in string" - * <li> name='my string with , in string' * + * For String property you can use ex: + * <ul> + * <li> name="my string with , in string"</li> + * <li> name='my string with , in string'</li> + * </ul> * @param classnameAndProperties * @return the instanciated object * @throws ClassNotFoundException @@ -259,7 +260,7 @@ public class ObjectUtil { // ObjectUtil /** * Clone object by introspection because Cloneable interface don't permit * to call clone :(. This methode replace next code that don't work :( - * <p/> + * * <pre> * if (o instanceof Cloneable) { * Object n = ((Cloneable)o).clone(); @@ -565,7 +566,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a char to a Character Object * * @param c the char to transform @@ -579,7 +580,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a byte to a Byte Object * * @param b the byte to transform @@ -593,7 +594,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a short to a Short object * * @param s the short to transform @@ -607,7 +608,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform an int to an Integer object * * @param i the int to transform @@ -621,7 +622,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a long to a Long object * * @param l the long to transform @@ -635,7 +636,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a float to a Float Object * * @param f the float to transform @@ -649,7 +650,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a double to a Double object * * @param d the double to transform @@ -663,7 +664,7 @@ public class ObjectUtil { // ObjectUtil /** * Method toObject - * <p/> + * * transform a boolean to a Boolean object * * @param b the boolean to transform diff --git a/src/main/java/org/nuiton/util/PagerBean.java b/src/main/java/org/nuiton/util/PagerBean.java index 9889c44..5d9374f 100644 --- a/src/main/java/org/nuiton/util/PagerBean.java +++ b/src/main/java/org/nuiton/util/PagerBean.java @@ -28,10 +28,10 @@ import java.io.Serializable; /** * A pager bean. - * <p/> + * * Was previously {@code org.nuiton.util.PagerUtil.PagerBean}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.6.2 * @deprecated since 3.0, prefer using {@link org.nuiton.util.pagination.PaginationParameter}. */ diff --git a/src/main/java/org/nuiton/util/PagerBeanUtil.java b/src/main/java/org/nuiton/util/PagerBeanUtil.java index 48ed89b..8838717 100644 --- a/src/main/java/org/nuiton/util/PagerBeanUtil.java +++ b/src/main/java/org/nuiton/util/PagerBeanUtil.java @@ -29,10 +29,10 @@ import java.util.List; /** * Useful method around {@link PagerBean}. - * <p/> + * * Was previously {@code org.nuiton.util.PagerUtil}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.6.2 */ public class PagerBeanUtil { @@ -81,7 +81,7 @@ public class PagerBeanUtil { /** * Get the elements of the lists using the pager datas: - * <p/> + * * <ul> * <li>{@code elements}:all elements of the pager</li> * <li>{@code pageSize}: number of elements in a page</li> diff --git a/src/main/java/org/nuiton/util/PeriodDates.java b/src/main/java/org/nuiton/util/PeriodDates.java index 2bba688..90bb7ad 100644 --- a/src/main/java/org/nuiton/util/PeriodDates.java +++ b/src/main/java/org/nuiton/util/PeriodDates.java @@ -31,11 +31,10 @@ import java.util.List; /** * TODO tchemit 2010-08-25 JAVADOC + I18N * PeriodDates.java - * <p/> + * * Created on 2009-08-13 * * @author fdesbois - * @version $Id$ */ public class PeriodDates implements Serializable { @@ -258,7 +257,7 @@ public class PeriodDates implements Serializable { public String toString() { String fromStr = DateUtil.formatDate(getFromDate(), pattern); String thruStr = DateUtil.formatDate(getThruDate(), pattern); - return "[ " + getFromDate() + " (pattern: " + fromStr + ") -> " + + return "[ " + getFromDate() + " (pattern: " + fromStr + ") → " + getThruDate() + " (pattern: " + thruStr + ") ]"; } diff --git a/src/main/java/org/nuiton/util/PropertiesDateRemoveFilterStream.java b/src/main/java/org/nuiton/util/PropertiesDateRemoveFilterStream.java index 745ab8b..0d772d2 100644 --- a/src/main/java/org/nuiton/util/PropertiesDateRemoveFilterStream.java +++ b/src/main/java/org/nuiton/util/PropertiesDateRemoveFilterStream.java @@ -29,14 +29,10 @@ import java.util.Properties; /** * Class used to not print first line into delegated {@link OutputStream}. - * <p/> + * * Used to remove first comment line writed by {@link Properties#store(OutputStream, String)}. * * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ - * By : $Author$ */ public class PropertiesDateRemoveFilterStream extends FilterOutputStream { diff --git a/src/main/java/org/nuiton/util/RecursiveProperties.java b/src/main/java/org/nuiton/util/RecursiveProperties.java index 383e1f6..18d18d8 100644 --- a/src/main/java/org/nuiton/util/RecursiveProperties.java +++ b/src/main/java/org/nuiton/util/RecursiveProperties.java @@ -28,7 +28,7 @@ import java.util.Properties; * Overrides {@link Properties} in order to check if the expected value * contains another property key like "${...}". It that case, the key * will be replaced by its value if possible. - * <p/> + * * Example : * <pre> * myFirstName=Arnaud @@ -38,7 +38,7 @@ import java.util.Properties; * namePhrase=My name is ${myName}. * instruction=Put your text like this : ${myText} * </pre> - * <p/> + * * Dans ce cas, * <ul> * <li>getProperty("org.nuiton.topia.userInfo.fullName") renverra "Arnaud Thimel" @@ -46,7 +46,7 @@ import java.util.Properties; * <li>getProperty("instruction") renverra "Put your text like this : ${myText}" * </ul> * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class RecursiveProperties extends Properties { diff --git a/src/main/java/org/nuiton/util/ReflectUtil.java b/src/main/java/org/nuiton/util/ReflectUtil.java index 09eafc5..78b3501 100644 --- a/src/main/java/org/nuiton/util/ReflectUtil.java +++ b/src/main/java/org/nuiton/util/ReflectUtil.java @@ -43,11 +43,10 @@ import static org.nuiton.i18n.I18n.t; * Introspection sur une classe. Détermine si un attribut est constant, * recherche de constantes d'un type donné, conversion d'une classe en * Enum... - * <p/> + * * Created: 30 décembre 2007 * - * @author tchemit <chemit@codelutin.com> - * $Id$ + * @author Tony Chemit - chemit@codelutin.com */ public class ReflectUtil { @@ -60,7 +59,7 @@ public class ReflectUtil { * (modifiers sont static, final et public) * * @param field le champs à tester - * @return <code>true</code> si les modifiers sont final, static et public + * @return {@code true} si les modifiers sont final, static et public */ public static boolean isConstantField(Field field) { int modifiers = field.getModifiers(); @@ -70,9 +69,9 @@ public class ReflectUtil { } /** - * Recherche dans une classe donnée <code>klazz</code>, les constantes d'un - * certain type <code>searchingClass</code> et les retourne. - * <p/> + * Recherche dans une classe donnée {@code klazz}, les constantes d'un + * certain type {@code searchingClass} et les retourne. + * * L'algorithme parcourt aussi les superclasses. * * @param <T> enumeration's type @@ -186,7 +185,7 @@ public class ReflectUtil { /** * Obtain the boxed type of any incoming type. - * <p/> + * * If incoming type is not a primitive type, then just returns himself. * * @param type the type to box @@ -232,7 +231,7 @@ public class ReflectUtil { /** * Obtain the unboxed type of any incoming type. - * <p/> + * * If incoming type is a primitive type, then just returns himself. * * @param type the type to unbox @@ -279,7 +278,7 @@ public class ReflectUtil { /** * Obtain all the declared fields of the given {@code objectClass} with a * deep scan inside super classes and interfaces. - * <p/> + * * <strong>Note:</strong> The type {@link Object} will not be scanned. * * @param objectClass the object class to scan @@ -301,7 +300,7 @@ public class ReflectUtil { /** * Obtain all the declared methods of the given {@code objectClass} with a * deep scan inside super classes and interfaces. - * <p/> + * * <strong>Note:</strong> The type {@link Object} will not be scanned. * * @param objectClass the object class to scan @@ -322,7 +321,7 @@ public class ReflectUtil { /** * Obtain all the fields with the given annotation type. - * <p/> + * * <strong>Note:</strong> This method will not scan deeply the given type * (no scan of super-classes nor interfaces). * @@ -343,10 +342,10 @@ public class ReflectUtil { /** * Obtain all the fields with the given annotation type. - * <p/> + * * <strong>Note:</strong> This method will scan deeply the given type * if parameter {@code deepVisit} is setted to {@code true}. - * <p/> + * * <strong>Note:</strong> The type {@link Object} will not be scanned. * * @param objectClass the type to scan @@ -381,7 +380,7 @@ public class ReflectUtil { /** * Obtain all the methods with the given annotation type. - * <p/> + * * <strong>Note:</strong> This method will not scan deeply the given type * (no scan of super-classes nor interfaces). * @@ -402,10 +401,10 @@ public class ReflectUtil { /** * Obtain all the methods with the given annotation type. - * <p/> + * * <strong>Note:</strong> This method will scan deeply the given type * if parameter {@code deepVisit} is setted to {@code true}. - * <p/> + * * <strong>Note:</strong> The type {@link Object} will not be scanned. * * @param objectClass the type to scan diff --git a/src/main/java/org/nuiton/util/Resource.java b/src/main/java/org/nuiton/util/Resource.java index a5c3c98..ed5fd40 100644 --- a/src/main/java/org/nuiton/util/Resource.java +++ b/src/main/java/org/nuiton/util/Resource.java @@ -59,11 +59,11 @@ import static org.nuiton.i18n.I18n.t; * <pre> * URL image = Resource.getURL("/images/bidulle.png"); * </pre> - * <p/> + * * Created: 5 août 2003 * - * @author bpoussin <poussin@codelutin.com> - * $Id$ + * @author Benjamin Poussin - poussin@codelutin.com + * */ public class Resource { // Resource @@ -172,7 +172,7 @@ public class Resource { // Resource /** * Retourner la liste des fichiers du classLoader. Ces fichiers doivent * correspondre au pattern donne. - * <p/> + * * Utile par defaut {@link ClassLoader#getSystemClassLoader()}. * * @param pattern le nom du fichier a extraire du fichier compressé ou @@ -542,7 +542,7 @@ public class Resource { // Resource * * @param url the url to seek * @param directory the directory to find - * @return <code>true</code> if directory was found, <code>false</code> otherwise. + * @return {@code true} if directory was found, {@code false} otherwise. * @throws IOException if any io pb */ public static boolean containsDirectDirectory(URL url, String directory) throws IOException { @@ -593,11 +593,11 @@ public class Resource { // Resource /** * Find pattern resouces in {@link ClassLoader#getSystemClassLoader()}. - * <p/> + * * Usage : * <pre> - * List<URL> urls = Resources.getResources("META-INF/.*\\.MF"); - * List<URL> urls = Resources.getResources("org/nuiton/util/.?esource\\.class"); + * List<URL> urls = Resources.getResources("META-INF/.*\\.MF"); + * List<URL> urls = Resources.getResources("org/nuiton/util/.?esource\\.class"); * </pre> * * @param pattern java regex style pattern to find @@ -611,11 +611,11 @@ public class Resource { // Resource /** * Find pattern resouces in classloader. - * <p/> + * * Usage : * <pre> - * List<URL> urls = Resources.getResources("META-INF/.*\\.MF"); - * List<URL> urls = Resources.getResources("org/nuiton/util/.?esource\\.class"); + * List<URL> urls = Resources.getResources("META-INF/.*\\.MF"); + * List<URL> urls = Resources.getResources("org/nuiton/util/.?esource\\.class"); * </pre> * * @param pattern java regex style pattern to find @@ -663,8 +663,8 @@ public class Resource { // Resource // get root directory to get URL in classpath // for example : - // /WEB-INF/*.xml -> /WEB-INF/ - // /META-INF/persistence/*.xml -> /META-INF/persistence/ + // /WEB-INF/*.xml → /WEB-INF/ + // /META-INF/persistence/*.xml → /META-INF/persistence/ int prefixEnd = pattern.indexOf(":") + 1; int rootDirEnd = pattern.length(); while (rootDirEnd > prefixEnd && @@ -699,7 +699,7 @@ public class Resource { // Resource /** * Test if an url detnoe a jar file. - * <p/> + * * Code taken from spring source code : * org.springframework.core.io.support.PathMatchingResourcePatternResolver * @@ -717,7 +717,7 @@ public class Resource { // Resource /** * Find all resources in jar files that match the given location pattern * via the Java Regex style Matcher. - * <p/> + * * Code taken from spring source code : * org.springframework.core.io.support.PathMatchingResourcePatternResolver * @@ -746,7 +746,7 @@ public class Resource { // Resource JarEntry jarEntry = jarCon.getJarEntry(); rootEntryPath = jarEntry != null ? jarEntry.getName() : ""; } else { - // No JarURLConnection -> need to resort to URL file parsing. + // No JarURLConnection → need to resort to URL file parsing. // We'll assume URLs of the format "jar:path!/entry", with the protocol // being arbitrary as long as following the entry format. // We'll also handle paths with and without leading "file:" prefix. @@ -803,7 +803,7 @@ public class Resource { // Resource /** * Find all resources in the file system that match the given location pattern * via the Java style matcher. - * <p/> + * * Code taken from spring source code : * org.springframework.core.io.support.PathMatchingResourcePatternResolver * @@ -831,7 +831,7 @@ public class Resource { // Resource /** * Retrieve files that match the given path pattern, * checking the given directory and its subdirectories. - * <p/> + * * Code taken from spring source code : * org.springframework.core.io.support.PathMatchingResourcePatternResolver * @@ -868,7 +868,7 @@ public class Resource { // Resource /** * Recursively retrieve files that match the given pattern, * adding them to the given result list. - * <p/> + * * Code taken from spring source code : * org.springframework.core.io.support.PathMatchingResourcePatternResolver * diff --git a/src/main/java/org/nuiton/util/ResourceException.java b/src/main/java/org/nuiton/util/ResourceException.java index e2fbb00..e6b3702 100644 --- a/src/main/java/org/nuiton/util/ResourceException.java +++ b/src/main/java/org/nuiton/util/ResourceException.java @@ -26,7 +26,7 @@ * Created: 6 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/main/java/org/nuiton/util/ResourceNotFoundException.java b/src/main/java/org/nuiton/util/ResourceNotFoundException.java index f0fcba6..d68fe4c 100644 --- a/src/main/java/org/nuiton/util/ResourceNotFoundException.java +++ b/src/main/java/org/nuiton/util/ResourceNotFoundException.java @@ -27,7 +27,7 @@ * * @author POUSSIN Benjamin <bpoussin@free.fr> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/main/java/org/nuiton/util/ResourceResolver.java b/src/main/java/org/nuiton/util/ResourceResolver.java index 2f56bd1..44a1936 100644 --- a/src/main/java/org/nuiton/util/ResourceResolver.java +++ b/src/main/java/org/nuiton/util/ResourceResolver.java @@ -41,30 +41,33 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * ResourceResolver is a URIResolver for XSL transformation. <br/> + * <p> + * ResourceResolver is a URIResolver for XSL transformation. + * </p> + * <p> * Its purpose is to catch the XSL document(...) function call and return a * valid data source only if the wanted resource is present in the project - * resources. <br/> - * The main goal of ResourceResolver is to retrieve datasources locally, if the + * resources. + * </p> + * <p>The main goal of ResourceResolver is to retrieve datasources locally, if the * wanted resource is not present in project resource then null will be - * returned.<br/> - * <p/> - * The resolve function search for the file part of href parameter: <br/> - * href: http://argouml.org/profiles/uml14/default-uml14.xmi <br/> - * file part: default-uml14.xmi. <br/> - * The resource is searched this way: <br/> - * eg: <code>[file part extension]/[file part]</code> <br/> - * eg: <code>xmi/default-uml14.xmi</code> - * <p/> + * returned. + * </p> + * The resolve function search for the file part of href parameter: + * <ul> + * <li>href: http://argouml.org/profiles/uml14/default-uml14.xmi</li> + * <li>file part: default-uml14.xmi.</li> + * </ul> + * The resource is searched this way: + * <ul> + * <li>eg: {@code [file part extension]/[file part]}</li> + * <li>eg: {@code xmi/default-uml14.xmi}</li> + * </ul> + * * You should assign this ResourceResolver on - * {@link Transformer} but not on - * {@link TransformerFactory}. <br/> + * {@link Transformer} but not on {@link TransformerFactory}. * * @author chorlet - * @version $Revision$ - * <p/> - * Last update : $Date$ - * By : */ public class ResourceResolver implements URIResolver { diff --git a/src/main/java/org/nuiton/util/ReverseFileReader.java b/src/main/java/org/nuiton/util/ReverseFileReader.java index 98f885b..6660598 100644 --- a/src/main/java/org/nuiton/util/ReverseFileReader.java +++ b/src/main/java/org/nuiton/util/ReverseFileReader.java @@ -29,11 +29,10 @@ import java.io.RandomAccessFile; /** * Reverse file reader. - * <p/> + * * Read file line by line for end of file to begin of file. * * @author chatellier - * @version $ID: $ */ public class ReverseFileReader implements Closeable { protected String filename; diff --git a/src/main/java/org/nuiton/util/SemVer.java b/src/main/java/org/nuiton/util/SemVer.java index 7bf55f6..5c8bdc1 100644 --- a/src/main/java/org/nuiton/util/SemVer.java +++ b/src/main/java/org/nuiton/util/SemVer.java @@ -23,13 +23,14 @@ package org.nuiton.util; */ -import java.util.regex.Matcher; -import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Implantation de http://semver.org/. * @@ -37,13 +38,16 @@ import org.apache.commons.logging.LogFactory; * pour modifier un de ses elements * * Quelques changement par rapport au site: + * <ul> * <li> le numero de version peut avoir entre 1 et N element, et non pas 3 obligatoirement * <li> on peut avoir un -SNAPSHOT ajoute en toute fin de la version + * </ul> * * Un SemVer est en plusieurs elements dont chaque element peut avoir plusieurs * composant. Les composants sont utilise le meme separateur '.'. * - * <li> version: 1 à N composant numerique, les 3 premiers sont nomme + * <ul> + * <li> version: 1 à N composant numerique, les 3 premiers sont nomme * <ul> * <li> major * <li> minor @@ -52,28 +56,27 @@ import org.apache.commons.logging.LogFactory; * <li> prerelease: 0 à N composant alphanumerique, le prefix est '-' * <li> build: 0 à N composant alphanumerique, le prefix est '+' * <li> SNAPSHOT: 0 ou 1 composant dont le nom est fixe le prefix est '-' + * </ul> + * Le mieux pour construire ou modifier un SemVer est d'utilise une methode creator: + * <ul> + * <li> SemVer.creator(1,2,3).done() → "1.2.3" + * <li> SemVer.creator("1.2.3","rc2").done() → "1.2.3-rc2" + * <li> SemVer.creator().setVersion(2.3.4).setBuild("r223").done() → "2.3.4+r223" + * <li> SemVer.creator().setVersion(2.3.4).setSnapshot(true).done() → "2.3.4-SNAPSHOT" + * <li> SemVer.creator(new SemVer("1.2.3")).incMajor().done() → "2.2.2" + * <li> new SemVer("1.2.3").getCreator().incMinor().setPrerelease(beta).done() → "1.3.3-beta" + * </ul> * - * Le mieux pour construire ou modifier un SemVer est d'utilise une methode - * creator: - * <li> SemVer.creator(1,2,3).done() => "1.2.3" - * <li> SemVer.creator("1.2.3","rc2").done() => "1.2.3-rc2" - * <li> SemVer.creator().setVersion(2.3.4).setBuild("r223").done() => "2.3.4+r223" - * <li> SemVer.creator().setVersion(2.3.4).setSnapshot(true).done() => "2.3.4-SNAPSHOT" - * <li> SemVer.creator(new SemVer("1.2.3")).incMajor().done() => "2.2.2" - * <li> new SemVer("1.2.3").getCreator().incMinor().setPrerelease(beta).done() => "1.3.3-beta" + * @author Benjamin Poussin - poussin@codelutin.com * - * @author poussin - * @version $Revision$ * - * Last update: $Date$ - * by : $Author$ * @since 2.6.7 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.SemVer}). */ @Deprecated public class SemVer implements Comparable<SemVer> { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** Logger. */ static private Log log = LogFactory.getLog(SemVer.class); /** Separateur utiliser entre chaque element d'une partie */ @@ -135,7 +138,7 @@ public class SemVer implements Comparable<SemVer> { /** * @param o the other version to test - * @return <code>true</code> if current version is before the given one + * @return {@code true} if current version is before the given one */ public boolean before(SemVer o) { int result = compareTo(o); @@ -144,7 +147,7 @@ public class SemVer implements Comparable<SemVer> { /** * @param o the other version to test - * @return <code>true</code> if current version is after the given one + * @return {@code true} if current version is after the given one */ public boolean after(SemVer o) { int result = compareTo(o); @@ -257,8 +260,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de l'element + * <ul> * <li>1.2.3 retourne 3 * <li>99.100 retourne 2 + * </ul> * * @return */ @@ -292,8 +297,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la version + * <ul> * <li>1.2.3 retourne 3 * <li>99.100 retourne 2 + * </ul> * * @return */ @@ -333,8 +340,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la Prerelease + * <ul> * <li>1.2.3 retourne 3 * <li>99.100 retourne 2 + * </ul> * * @return */ @@ -359,8 +368,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la Prerelease + * <ul> * <li>1.2.3 retourne 3 * <li>99.100 retourne 2 + * </ul> * * @return */ diff --git a/src/main/java/org/nuiton/util/SortedProperties.java b/src/main/java/org/nuiton/util/SortedProperties.java index 2834db4..08c235e 100644 --- a/src/main/java/org/nuiton/util/SortedProperties.java +++ b/src/main/java/org/nuiton/util/SortedProperties.java @@ -31,8 +31,8 @@ import java.util.Vector; /** * Permet d'avoir les propriétés triées. * - * @author jruchaud <ruchaud@codelutin.com> - * $Id$ + * @author Julien Ruchaud - ruchaud@codelutin.com + * */ public class SortedProperties extends Properties { diff --git a/src/main/java/org/nuiton/util/StringUtil.java b/src/main/java/org/nuiton/util/StringUtil.java index 95e6a5d..458eebc 100644 --- a/src/main/java/org/nuiton/util/StringUtil.java +++ b/src/main/java/org/nuiton/util/StringUtil.java @@ -41,12 +41,12 @@ import java.util.Locale; * Classe contenant un ensemle de methode static utiles pour la manipulation des * chaine de caractere mais qui ne sont pas defini dans la classe String de * Java. - * <p/> + * * Created: 21 octobre 2003 * - * @author bpoussin <poussin@codelutin.com> - * @author tchemit <chemit@codelutin.com> - * $Id$ + * @author Benjamin Poussin - poussin@codelutin.com + * @author Tony Chemit - chemit@codelutin.com + * */ public class StringUtil { // StringUtil @@ -60,7 +60,7 @@ public class StringUtil { // StringUtil * Know if a string is a valid e-mail. * * @param str a string - * @return true if <code>str</code> is syntactically a valid e-mail address + * @return true if {@code str} is syntactically a valid e-mail address * @since 2.1 */ public static boolean isEmail(String str) { @@ -133,7 +133,7 @@ public class StringUtil { // StringUtil /** * Use {@link Object#toString()} method by default - * Must be @{@link Override} to use other methods to get string value. + * Must be override to use other methods to get string value. * * @param o to convert * @return String value @@ -214,12 +214,12 @@ public class StringUtil { // StringUtil /** * substring from begin to end of s - * <p/> + * * example: - * <li> substring("tatetitotu", -4) => totu + * substring("tatetitotu", -4) → totu * * @param s the string to substring - * @param begin if begin < 0 then begin start at end of string - begin + * @param begin if begin < 0 then begin start at end of string - begin * @return the result of substring */ public static String substring(String s, int begin) { @@ -229,9 +229,9 @@ public class StringUtil { // StringUtil /** * substring from begin to end of s - * <p/> + * * example: - * <li> substring("tatetitotu", -4, -2) => to + * substring("tatetitotu", -4, -2) → to * * @param s the string to substring * @param begin if begin < 0 then begin start at end of string - begin @@ -262,7 +262,7 @@ public class StringUtil { // StringUtil * Split string use 'separator' as separator. If String contains "'()[]{} * this method count the number of open char end close char to split * correctly argument - * <p/> + * * WARNING: cette method ne fonctionne pas si le contenu contient * des carateres utilisé pour le parsing et présent une seule fois. * Par exemple: "l'idenfiant" contient ' qui empeche totalement le @@ -280,14 +280,14 @@ public class StringUtil { // StringUtil /** * Use to split string array representation in array according with ',' as * default separator. - * <p/> + * * WARNING: cette method ne fonctionne pas si le contenu contient * des carateres utilisé pour le parsing et présent une seule fois. * Par exemple: "l'idenfiant" contient ' qui empeche totalement le * parsing de fonctionner. * * @param stringList string that represent array - * @return array with length > 0 if listAsString != null or null + * @return array with length > 0 if listAsString ≠ null or null */ public static String[] split(String stringList) { String[] result; @@ -297,11 +297,11 @@ public class StringUtil { // StringUtil /** * Split string use 'separator' as separator. If String contains "' - * and <code>openingChar</code> <code>closingChars</code> - * <p/> + * and {@code openingChar} {@code closingChars} + * * this method count the number of open char end close char to split * correctly argument - * <p/> + * * WARNING: cette method ne fonctionne pas si le contenu contient * des carateres utilisé pour le parsing et présent une seule fois. * Par exemple: "l'idenfiant" contient ' qui empeche totalement le @@ -620,17 +620,17 @@ public class StringUtil { // StringUtil /** * Vérifie q'une chaine de caractère est valid pour les bloc openner closer, ie. - * <p/> + * * que les blocs définit par les deux caractères s'entrechevauchent pas. - * <p/> + * * Exemple avec '(' ')' : - * <p/> + * * (a(b)) est valide, par contre ((aaa))) n'est pas valide * * @param txt txte a verifier * @param opener le caractère ouvrant * @param closer le caractère fermant - * @return <code>true</code> is la chaine est valide + * @return {@code true} is la chaine est valide */ public static boolean checkEnclosure(String txt, char opener, char closer) { if (txt.indexOf(opener) == -1 && txt.indexOf(closer) == -1) { @@ -659,7 +659,7 @@ public class StringUtil { // StringUtil /** * Convertir un nom en une constante Java - * <p/> + * * Les seuls caractères autorisés sont les alpha numériques, ains * que l'underscore. tous les autres caractères seront ignorés. * diff --git a/src/main/java/org/nuiton/util/TimeLog.java b/src/main/java/org/nuiton/util/TimeLog.java index ba4529b..758bf6d 100644 --- a/src/main/java/org/nuiton/util/TimeLog.java +++ b/src/main/java/org/nuiton/util/TimeLog.java @@ -29,7 +29,7 @@ import java.util.Map; /** * Cette classe permet de facilement trace le temps d'execution entre deux points - * <p/> + * * usage * <pre> * final static private Log log = LogFactory.getLog(MyClass.class); @@ -49,18 +49,15 @@ import java.util.Map; * * System.out.println ("time: " + timeLog.getCallCount()); * </pre> - * <p/> + * * You can configure log level in configuration file with: * log4j.logger.org.codelutin.MyClass=DEBUG * log4j.logger.org.codelutin.MyClass.TimeLog=INFO * - * @author poussin - * @version $Revision$ + * @author Benjamin Poussin - poussin@codelutin.com + * * @see CallAnalyse * @since 2.1 - * <p/> - * Last update: $Date$ - * by : $Author$ */ public class TimeLog { @@ -150,12 +147,12 @@ public class TimeLog { /** @param timeToLogInfoMs time in milliseconde after that we log info */ public void setTimeToLogInfo(long timeToLogInfoMs) { - timeToLogInfo = timeToLogInfoMs * 1000000l; // convert ms -> ns + timeToLogInfo = timeToLogInfoMs * 1000000l; // convert ms → ns } /** @param timeToLogWarnMs time in milliseconde after that we log warn */ public void setTimeToLogWarn(long timeToLogWarnMs) { - timeToLogWarn = timeToLogWarnMs * 1000000l; // convert ms -> ns + timeToLogWarn = timeToLogWarnMs * 1000000l; // convert ms → ns } public Map<String, CallStat> getCallCount() { diff --git a/src/main/java/org/nuiton/util/TransparenteSoftReference.java b/src/main/java/org/nuiton/util/TransparenteSoftReference.java index eace092..bd50c2d 100644 --- a/src/main/java/org/nuiton/util/TransparenteSoftReference.java +++ b/src/main/java/org/nuiton/util/TransparenteSoftReference.java @@ -27,7 +27,7 @@ * * @author Benjamin Poussin <poussin@codelutin.com> * Copyright Code Lutin -* @version $Revision$ +* * * Mise a jour: $Date$ * par : $Author$ diff --git a/src/main/java/org/nuiton/util/TransparenteWeakReference.java b/src/main/java/org/nuiton/util/TransparenteWeakReference.java index 356a5b2..7902fd1 100644 --- a/src/main/java/org/nuiton/util/TransparenteWeakReference.java +++ b/src/main/java/org/nuiton/util/TransparenteWeakReference.java @@ -27,7 +27,7 @@ * * @author Benjamin Poussin <poussin@codelutin.com> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ @@ -104,7 +104,7 @@ public class TransparenteWeakReference<T> extends WeakReference<T> { /** * @param o l'objet a comparer - * @return <code>true</code> si meme reference memoire on les objets + * @return {@code true} si meme reference memoire on les objets * references sont egaux */ @Override diff --git a/src/main/java/org/nuiton/util/Version.java b/src/main/java/org/nuiton/util/Version.java index 1fd18fd..a3aa90b 100644 --- a/src/main/java/org/nuiton/util/Version.java +++ b/src/main/java/org/nuiton/util/Version.java @@ -32,37 +32,36 @@ import static org.nuiton.i18n.I18n.t; /** * A class to represent an application version with possible classifier. - * <p/> + * * Replace previously org.nuiton.util.VersionNumber class. - * <p/> + * * Simple version number is defined like this : * <pre> * 1.0.0 or 1 * </pre> - * <p/> + * * A version can be more complex, with a classifier like this : * <pre> * 1.0.0-alpha-1, 1.0.0-beta-2, 1.0.0-rc-1 * </pre> - * <p/> + * * A classifier (alpha, beta, rc, ...) must be follwed by a classifier number. - * <p/> + * * Note : - * <p/> + * * - initial value is 0 - * <p/> + * * - the equals order is defined on {@link #getVersion()} property. - * <p/> + * * - the class is comparable, using the natural version order : - * <p/> - * <pre>0 < 0.1 < 1 < 1.0 < 1.1-alpha-0 < 1.1-alpha-1 < 1.1-beta-0 < - * 1.1-rc-1 < 1.1 </pre> - * <p/> + * + * <pre>0 <0.1 <1 <1.0 <1.1-alpha-0 <1.1-alpha-1 <1.1-beta-0 < 1.1-rc-1 <1.1 </pre> + * * - the class is immutable, you should not instanciate directly a Version, * but prefer use the factory static methods - * <code>VersionUtil.valueOf(...)</code> instead. + * {@code VersionUtil.valueOf(...)} instead. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.1.0 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.Version}). */ @@ -93,12 +92,12 @@ public class Version implements Comparable<Version>, Serializable { /** * A flag to attach or not the classifier with his number. - * <p/> + * * If set to false (the default cas then a - will be used to separe them). - * <p/> + * * Even if the {@link Version} class is immutable, this state can be change * since it is only used to build the string representation of a version. - * <p/> + * * Notes that this state is NOT used to test equality of two version, * neither for the comparaison. * @@ -319,7 +318,7 @@ public class Version implements Comparable<Version>, Serializable { /** * @param o the other version to test - * @return <code>true</code> if current version is before the given one + * @return {@code true} if current version is before the given one */ public boolean before(Version o) { int result = compareTo(o); @@ -328,7 +327,7 @@ public class Version implements Comparable<Version>, Serializable { /** * @param o the other version to test - * @return <code>true</code> if current version is after the given one + * @return {@code true} if current version is after the given one */ public boolean after(Version o) { int result = compareTo(o); diff --git a/src/main/java/org/nuiton/util/VersionUtil.java b/src/main/java/org/nuiton/util/VersionUtil.java index c579c1d..e829643 100644 --- a/src/main/java/org/nuiton/util/VersionUtil.java +++ b/src/main/java/org/nuiton/util/VersionUtil.java @@ -32,10 +32,10 @@ import java.util.regex.Pattern; /** * Class of usefull methods on {@link Version} objects. - * <p/> - * There is some factory methods : <code>valueOf(XXX)</code> to obtain a new + * + * There is some factory methods : {@code valueOf(XXX)} to obtain a new * version. - * <p/> + * * Some methods to transform a version (since version are immutable, we can not * modify Version's property) : * <pre> @@ -45,7 +45,7 @@ import java.util.regex.Pattern; * - removeClassifier(Version) : to remove a classifier from a version * </pre> * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.1.0 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.Version}). */ @@ -55,17 +55,17 @@ public class VersionUtil { /** * Pattern pour detecter une version (avec si classifier et numéro de * classifier séparé par un -, par exemple : 1.0-beta-1). - * <p/> + * * Le pattern possède toujours 4 groupes de captures. - * <p/> + * * - Le groupe 1 est le nombre de la version * - Le groupe 2 est le classifier (peut-etre null) * - Le groupe 3 est le numéro de classifier (peut-etre null) * - Le groupe 4 est le suffix -SNAPSHOT (peut-etre null) - * <p/> + * * Dans le cas d'une version simple (sans classifier), le groupe 2, 3 et * 4 sont null. - * <p/> + * * Dans le cas d'une version non snapshot, le groupe 4 est null. */ public static final Pattern VERSION_PATTERN = @@ -74,17 +74,17 @@ public class VersionUtil { /** * Pattern pour detecter une version (avec si classifier et numéro de * classifier collé, par exemple : 1.0-rc1). - * <p/> + * * Le pattern possède toujours 4 groupes de captures. - * <p/> + * * - Le groupe 1 est le nombre de la version * - Le groupe 2 est le classifier (peut-etre null) * - Le groupe 3 est le numéro de classifier (peut-etre null) * - Le groupe 4 est le suffix -SNAPSHOT (peut-etre null) - * <p/> + * * Dans le cas d'une version simple (sans classifier), le groupe 2, 3 et * 4 sont null. - * <p/> + * * Dans le cas d'une version non snapshot, le groupe 4 est null. */ public static final Pattern VERSION_PATTERN2 = @@ -243,10 +243,10 @@ public class VersionUtil { /** * Incremente le numero de version donnee, seul le dernier constituant est - * incremente: 1.2.3.4 -> 1.2.3.5; null -> 1; 0 -> 1. - * <p/> + * incremente: 1.2.3.4 → 1.2.3.5; null → 1; 0 → 1. + * * Si la version a un classifier, alors c'est la version du classifier qui - * change : 1.1-alpha-12 -> 1.1-alpha-13 + * change : 1.1-alpha-12 → 1.1-alpha-13 * * @param v la version a incrementer * @return la nouvelle version @@ -270,11 +270,11 @@ public class VersionUtil { } /** - * Remove the suffix <code>-SNAPSHOT</code> stamp from a version (if any). + * Remove the suffix {@code -SNAPSHOT} stamp from a version (if any). * * @param version the string representation of the version * @return the string representation of the given version - * without the <code>-SNAPSHOT</code> suffix (if any). + * without the {@code -SNAPSHOT} suffix (if any). * @throws NullPointerException if version is null */ public static String removeSnapshot(String version) @@ -329,20 +329,20 @@ public class VersionUtil { /** * L'implantation d'un comparateur de versions permettant de controler * l'ordre du numero de version, classifier et numero de classifer. - * <p/> + * * Toute implementation de ce contrat devrait suivre cet algorithme : - * <p/> + * * 1) Si versions égales, on quitte. - * <p/> + * * 2) On teste l'ordre des nombres {@link #compareNumbers(Version, Version)} - * <p/> + * * Si différent, alors versions différentes, on quitte - * <p/> + * * 3) On teste l'ordre des classifiers * {@link #compareClassifier(Version, Version)} - * <p/> + * * Si différent, alors versions différentes, on quitte - * <p/> + * * 4) On teste l'ordre des versions de classifiers * {@link #compareClassifierNumber(Version, Version)}. */ @@ -513,7 +513,7 @@ public class VersionUtil { /** * Trier un ensemble de versions données en entrees - * <p/> + * * On affiche le resultat dans la console * * @param args les versions diff --git a/src/main/java/org/nuiton/util/ZipUtil.java b/src/main/java/org/nuiton/util/ZipUtil.java index 6d18ec8..e081563 100644 --- a/src/main/java/org/nuiton/util/ZipUtil.java +++ b/src/main/java/org/nuiton/util/ZipUtil.java @@ -47,11 +47,11 @@ import java.util.zip.ZipOutputStream; /** * Opérations sur des fichiers Zip. Compression et décompression avec ou * sans filtres, scan des fichiers créés ou écrasés lors de la décompression... - * <p/> + * * Created: 24 août 2006 10:13:35 * - * @author bpoussin <poussin@codelutin.com> - * $Id$ + * @author Benjamin Poussin - poussin@codelutin.com + * */ public class ZipUtil { @@ -111,7 +111,7 @@ public class ZipUtil { /** * Uncompress zipped file in targetDir, and rename uncompressed file if * necessary. If renameFrom or renameTo is null no renaming is done - * <p/> + * * file in zip use / to separate directory and not begin with / * each directory ended with / * @@ -134,7 +134,7 @@ public class ZipUtil { /** * Uncompress zipped stream in targetDir, and rename uncompressed file if * necessary. If renameFrom or renameTo is null no renaming is done - * <p/> + * * file in zip use / to separate directory and not begin with / * each directory ended with / * @@ -160,7 +160,7 @@ public class ZipUtil { if (renameFrom != null && renameTo != null) { name = name.replaceAll(renameFrom, renameTo); if (log.isDebugEnabled()) { - log.debug("rename " + entry.getName() + " -> " + name); + log.debug("rename " + entry.getName() + " → " + name); } } result = name; @@ -268,7 +268,7 @@ public class ZipUtil { /** * If fileOrDirectory is directory Compress recursively all file in this * directory, else if is just file compress one file. - * <p/> + * * Entry result name in zip start at fileOrDirectory. * example: if we compress /etc/apache, entry will be apache/http.conf, ... * @@ -284,7 +284,7 @@ public class ZipUtil { /** * If fileOrDirectory is directory Compress recursively all file in this * directory, else if is just file compress one file. - * <p/> + * * Entry result name in zip start at fileOrDirectory. * example: if we compress /etc/apache, entry will be apache/http.conf, ... * @@ -302,7 +302,7 @@ public class ZipUtil { /** * If fileOrDirectory is directory Compress recursively all file in this * directory, else if is just file compress one file. - * <p/> + * * Entry result name in zip start at fileOrDirectory. * example: if we compress /etc/apache, entry will be apache/http.conf, ... * @@ -338,8 +338,8 @@ public class ZipUtil { * * @param root the root directory * @param file the file to treate - * @return the zip entry name corresponding to the given <code>file</code> - * from <code>root</code> dir. + * @return the zip entry name corresponding to the given {@code file} + * from {@code root} dir. */ private static String toZipEntryName(File root, File file) { String result = file.getPath(); @@ -365,22 +365,21 @@ public class ZipUtil { * Scan a zipFile, and fill two lists of relative paths corresponding of * zip entries. * First list contains all entries to be added while a uncompress operation - * on the destination directory </code>targetDir</code>. + * on the destination directory {@code targetDir}. * Second list contains all entries to be overwritten while a uncompress - * operation on the destination directory <code>targetDir</code>. - * <br> - * If <code>targetDir</code> is <code>null</code> we don't fill - * <cide>existingFiles<code/> list. + * operation on the destination directory {@code targetDir}. + * + * If {@code targetDir} is {@code null} we don't fill {@code existingFiles} list. * * @param zipFile location of the zip to scanZip * @param targetDir location of destination for a uncompress operation. - * If <code>null</code> we don't test to + * If {@code null} we don't test to * find overwritten files. * @param newFiles list of files to be added while a uncompress * @param existingFiles list of files to be overwritten while a uncompress - * if the <code>targetDir</code>, - * (only use if <code>targetDir</code> is not - * <code>null</code>) + * if the {@code targetDir}, + * (only use if {@code targetDir} is not + * {@code null}) * @param excludeFilter used to exclude some files * @param renameFrom {@link #uncompressAndRename(File, File, String, String)} * @param renameTo {@link #uncompressAndRename(File, File, String, String)} @@ -441,8 +440,8 @@ public class ZipUtil { /** * uncompress zipped file in targetDir. - * <p/> - * If <code>toTreate</code> if not null nor empty, we use it to filter + * + * If {@code toTreate} if not null nor empty, we use it to filter * entries to uncompress : it contains a list of relative local path of * files to uncompress. * Otherwise just delegate to {@link ZipUtil#uncompress(File, File)}. diff --git a/src/main/java/org/nuiton/util/beans/BeanMonitor.java b/src/main/java/org/nuiton/util/beans/BeanMonitor.java index bb1c227..9a895e2 100644 --- a/src/main/java/org/nuiton/util/beans/BeanMonitor.java +++ b/src/main/java/org/nuiton/util/beans/BeanMonitor.java @@ -38,23 +38,23 @@ import java.util.TreeMap; /** * A monitor of beans. - * <p/> + * * You indicates which properties to monitor (via the constructor). - * <p/> + * * Then attach a bean to monitor via the method {@link #setBean(Object)}. - * <p/> + * * The method {@link #clearModified()} reset the states about modified * properties. - * <p/> + * * The method {@link #wasModified()} tells if there was any modification on * monitored properties for the attached bean since the last call to * {@link #clearModified()} (or {@link #setBean(Object)}. - * <p/> + * * the method {@link #getModifiedProperties()} gives you the names of monitored * properties for the attached bean since the last call to * {@link #clearModified()} (or {@link #setBean(Object)}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.4.1 */ public class BeanMonitor { @@ -210,10 +210,10 @@ public class BeanMonitor { /** * Sets the {@code bean} to monitor. - * <p/> + * * As a side effect, it will attach the {@link #listener} to new bean * (if not null) and remove it from the previous bean attached (if not null). - * <p/> + * * As a second side effect, it will always clean the modified states, * using the method {@link #clearModified()}. * @@ -255,7 +255,7 @@ public class BeanMonitor { /** * To change the list of properties to watch. - * <p/> + * * <strong>Note:</strong> As a side-effect, we call a * {@link #clearModified()} method after having changed the list of * properties to watch. diff --git a/src/main/java/org/nuiton/util/beans/BeanUtil.java b/src/main/java/org/nuiton/util/beans/BeanUtil.java index 52123bb..10fc39f 100644 --- a/src/main/java/org/nuiton/util/beans/BeanUtil.java +++ b/src/main/java/org/nuiton/util/beans/BeanUtil.java @@ -38,7 +38,7 @@ import java.util.TreeMap; /** * Usefull methods around the {@link PropertyChangeListener}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.4.1 */ public class BeanUtil { @@ -285,7 +285,7 @@ public class BeanUtil { * Scan the given type and obtain {@link PropertyDescriptor} * given the (optional) predicate (except the {@code class} property of * any java object). - * <p/> + * * <strong>Note:</strong> If no predicate is given, then all descriptors * are returned. * diff --git a/src/main/java/org/nuiton/util/beans/Binder.java b/src/main/java/org/nuiton/util/beans/Binder.java index 6ee7ad2..23a979e 100644 --- a/src/main/java/org/nuiton/util/beans/Binder.java +++ b/src/main/java/org/nuiton/util/beans/Binder.java @@ -50,21 +50,21 @@ import java.util.TreeMap; /** * A {@code binder} permits to copy some properties from an object to another * one. - * <p/> + * * It is based on a {@link BinderModel} which contains the mapping of properties * to transfert from the source object to the destination object. - * <p/> + * * Use the method {@link #copy(Object, Object, String...)} to transfert properties. - * <p/> + * * Use the method {@link #obtainProperties(Object, String...)} to obtain some * properties from a given object. - * <p/> + * * For more informations about how to obtain a binder, see the * {@link BinderFactory} or the package info javadoc or unit tests... * * @param <I> the source bean type * @param <O> the destination bean type - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @see BinderFactory * @see BinderModelBuilder * @since 1.1.5 @@ -231,7 +231,7 @@ public class Binder<I, O> implements Serializable { /** * Obtain from the given object all properties registered in the binder * model. - * <p/> + * * <b>Note:</b> If a property's value is null, it will not be injected in * the result. * @@ -394,7 +394,7 @@ public class Binder<I, O> implements Serializable { * Copy properties from a source bean to a destination one according to * the model of the binder. If {@code propertyNames} is defined, only * those properties will be copied. - * <p/> + * * <b>Note:</b> If {@code from} object is null, then {@code null} values * will be set to mapped properties into {@code dst} * @@ -412,7 +412,7 @@ public class Binder<I, O> implements Serializable { /** * Copy properties from a source bean to a destination one according to * the model of the binder excluding {@code propertyNames}. - * <p/> + * * <b>Note:</b> If {@code from} object is null, then {@code null} values * will be set to mapped properties into {@code dst}. * @@ -486,7 +486,7 @@ public class Binder<I, O> implements Serializable { /** * Copy properties from a source bean to a destination one according to * the model of the binder. - * <p/> + * * <b>Note:</b> If {@code from} object is null, then {@code null} values * will be set to mapped properties into {@code dst}. * @@ -645,7 +645,7 @@ public class Binder<I, O> implements Serializable { /** * Compare two beans property by property according to the model. - * <p/> + * * List contains one element per property with different values (according * to the result of an equals() call) * @@ -661,7 +661,7 @@ public class Binder<I, O> implements Serializable { /** * Compare two beans property by property according to the model. - * <p/> + * * List contains one element per property with different values (according * to the result of an equals() call) * @@ -801,12 +801,12 @@ public class Binder<I, O> implements Serializable { /** * Model of a {@link Binder}. - * <p/> + * * TODO tchemit 20100225 should have special cases for collections treatment. * * @param <S> the source type * @param <T> the target type - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.1.5 */ public static class BinderModel<S, T> implements Serializable { diff --git a/src/main/java/org/nuiton/util/beans/BinderFactory.java b/src/main/java/org/nuiton/util/beans/BinderFactory.java index e75e3fe..e2704ce 100644 --- a/src/main/java/org/nuiton/util/beans/BinderFactory.java +++ b/src/main/java/org/nuiton/util/beans/BinderFactory.java @@ -31,33 +31,33 @@ import java.util.Set; /** * Factory of {@link Binder}. - * <p/> + * * <h1>Obtain a new binder</h1> * To obtain a new binder you can use the {@code newBinder(XXX)} methods. - * <p/> + * * For example to obtain a mirrored binder (same source and target type) which * will be able to copy all accepting properties, use this code : * <pre> - * Binder<BeanA, BeanA> binder = BinderFactory.newBinder(BeanA.class); + * Binder<BeanA, BeanA> binder = BinderFactory.newBinder(BeanA.class); * </pre> * <h1>Usage of contextale binder</h1> * It is possible to use different binder for same source and target type, using a * extra context name parameter, like this : * <pre> - * Binder<BeanA, BeanA> binder = BinderFactory.newBinder(BeanA.class, "mycontext"); + * Binder<BeanA, BeanA> binder = BinderFactory.newBinder(BeanA.class, "mycontext"); * </pre> - * <p/> + * * This is usefull when you register your own binder model in the factory (see * next section) to bind different things from the same type of objects... - * <p/> + * * <h1>Register a new binder model</h1> * To register a new binder's model use one of the method {@code registerBinderModel(XXX)}. - * <p/> - * <p/> + * + * * More documentation will come soon, yu can see the package info javadoc or * unit tests... * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.5.3 */ public class BinderFactory { @@ -201,7 +201,7 @@ public class BinderFactory { /** * Given a {@code model} and a {@code binderType}, instanciate a new binder * and returns it. - * <p/> + * * <strong>Note: </strong> This method will <strong>NOT</strong> register * the model in the factory. If you want to reuse your model, please use * one of the {@code registerBinderModel(XXX)} method. @@ -231,8 +231,8 @@ public class BinderFactory { /** * Clear the cache of registred binder models. - * <p/> - * <b>Note :<b> This is a convienient method for test purposes and should + * + * <b>Note :</b> This is a convienient method for test purposes and should * be used in a normal usage of this provider. */ public static void clear() { @@ -296,7 +296,7 @@ public class BinderFactory { /** * Instanciate a new binder given his types and his context's name. - * <p/> + * * If the corresponding binder model does not exist, then it will be created * and cached (using the {@link BinderModelBuilder#newDefaultBuilder(Class, Class)} method). * @@ -446,7 +446,7 @@ public class BinderFactory { /** * Definition of an binder model entry (source and target types + context name). - * <p/> + * * <b>Note :</b>When no context is specified, we always use a * {@code null} context name. */ diff --git a/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java b/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java index f905457..dcb9d39 100644 --- a/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java +++ b/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java @@ -38,16 +38,16 @@ import java.util.TreeMap; /** * Class to create a new {@link Binder.BinderModel}. - * <p/> - * <p/> + * + * * A such object is designed to build only one model of binder and can not be * used directly to create a new binder, it prepares only the model of a new * binder, which after must be registred in the {@link BinderFactory} to obtain * a real {@link Binder}. - * <p/> + * * If you want to create more than one binder model, use each time a new * binder builder. - * <p/> + * * To obtain a new instance of a build please use one of the factories method : * <ul> * <li>{@link #newEmptyBuilder(Class)}} to create a binder model with same @@ -84,23 +84,22 @@ import java.util.TreeMap; * <pre> * builder.addSimpleProperties(...).addProperty(...).addBinder(...) * </pre> - * <p/> + * * Here is an example of how to use the {@link BinderModelBuilder} : * <pre> - * BinderModelBuilder<Bean, Bean> builder = new BinderModelBuilder(Bean.class); + * BinderModelBuilder<Bean, Bean> builder = new BinderModelBuilder(Bean.class); * builder.addSimpleProperties("name", "surname"); * BinderFactory.registerBinderModel(builder); - * Binder<Bean, Bean> binder = BinderFactory.getBinder(BeanA.class); - * + * Binder<Bean, Bean> binder = BinderFactory.getBinder(BeanA.class); * </pre> - * <p/> + * * Once the binder is registred into the {@link BinderFactory}, you can get it * each time you need it : * <pre> - * Binder<Bean, Bean> binder = BinderFactory.getBinder(Bean.class); + * Binder<Bean, Bean> binder = BinderFactory.getBinder(Bean.class); * </pre> * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @see Binder.BinderModel * @see Binder * @since 1.5.3 @@ -253,7 +252,7 @@ public class BinderModelBuilder<S, T> { /** * Convinient method to create directly a {@link Binder} using the * underlying {@link #model} the builder contains. - * <p/> + * * <strong>Note:</strong> Using this method will not make reusable the model * via the {@link BinderFactory}. * @@ -269,7 +268,7 @@ public class BinderModelBuilder<S, T> { /** * Convinient method to create directly a {@link Binder} using the * underlying {@link #model} the builder contains. - * <p/> + * * <strong>Note:</strong> Using this method will not make reusable the model * via the {@link BinderFactory}. * @@ -294,7 +293,7 @@ public class BinderModelBuilder<S, T> { /** * Add to the binder model some simple properties (says source property name * = target property name). - * <p/> + * * <b>Note:</b> If no model is present, the method will fail. * * @param properties the name of mirrored property @@ -317,7 +316,7 @@ public class BinderModelBuilder<S, T> { /** * Add to the binder model some simple properties (says source property name * = target property name). - * <p/> + * * <b>Note:</b> If no model is present, the method will fail. * * @param sourceProperty the name of the source property to bind @@ -344,15 +343,15 @@ public class BinderModelBuilder<S, T> { /** * Add to the binder model some properties. - * <p/> + * * Parameter {@code sourceAndTargetProperties} must be a array of couple * of {@code sourceProperty}, {@code targetProperty}. - * <p/> + * * Example : * <pre> * builder.addProperties("name","name2","text","text"); * </pre> - * <p/> + * * <b>Note:</b> If no model is present, the method will fail. * * @param sourceAndTargetProperties the couple of (sourceProperty - diff --git a/src/main/java/org/nuiton/util/beans/InstanceFactory.java b/src/main/java/org/nuiton/util/beans/InstanceFactory.java index fad04ca..6bd17a8 100644 --- a/src/main/java/org/nuiton/util/beans/InstanceFactory.java +++ b/src/main/java/org/nuiton/util/beans/InstanceFactory.java @@ -22,10 +22,10 @@ package org.nuiton.util.beans; /** - * @author Sylvain Bavencoff <bavencoff@codelutin.com> + * @author Sylvain Bavencoff - bavencoff@codelutin.com */ public interface InstanceFactory<O> { - public O newInstance(); + O newInstance(); } diff --git a/src/main/java/org/nuiton/util/beans/PropertyDiff.java b/src/main/java/org/nuiton/util/beans/PropertyDiff.java index 3b25556..fed8e37 100644 --- a/src/main/java/org/nuiton/util/beans/PropertyDiff.java +++ b/src/main/java/org/nuiton/util/beans/PropertyDiff.java @@ -24,7 +24,7 @@ package org.nuiton.util.beans; /** * TODO * - * @author bleny <leny@codelutin.com> + * @author Brendan Le Ny - bleny@codelutin.com * @since 2.4 */ public class PropertyDiff { diff --git a/src/main/java/org/nuiton/util/beans/package-info.java b/src/main/java/org/nuiton/util/beans/package-info.java index 4449bd4..974cf82 100644 --- a/src/main/java/org/nuiton/util/beans/package-info.java +++ b/src/main/java/org/nuiton/util/beans/package-info.java @@ -33,14 +33,14 @@ * This api permits to some object properties from an object to another one. * </p> * <h2>Obtain a binder</h2> - * A {@link org.nuiton.util.beans.Binder} contains a safe model named + * <p>A {@link org.nuiton.util.beans.Binder} contains a safe model named * {@link org.nuiton.util.beans.Binder.BinderModel} which knows * all properties that can be copied. - * <br/> + * </p> * To use this api, you have only to get a {@link org.nuiton.util.beans.Binder} * object from the {@link org.nuiton.util.beans.BinderFactory} like this : * <pre> - * Binder<A, A> binder = BinderFactory.newBinder(A.class); + * Binder<A, A> binder = BinderFactory.newBinder(A.class); * </pre> * * It is also possible to build a more sofisticated binder which will only copy @@ -48,7 +48,7 @@ * * <h2>Use a binder</h2> * Once you have a binder, you use the {@link org.nuiton.util.beans.Binder} api : - * <p/> + * * To copy all properties from an object to another one : * <pre> * binder.copy(source, target); @@ -66,7 +66,7 @@ * * To obtain some properties from an object, use the following code : * <pre> - * Map<String, Object> properties = binder.obtainProperties(source, "propertyOne", "propertyTwo"); + * Map<String, Object> properties = binder.obtainProperties(source, "propertyOne", "propertyTwo"); * </pre> * * <h2>Building a new BinderModel</h2> @@ -78,8 +78,9 @@ * {@code org.nuiton.util.beans.BinderFactory#registerBinderModel(XXX)}. * </p> * More explainations will come soon... - * <br/> + * <p> * You can go and look on the unit tests which describe it pretty well :) : + * </p> * <pre> * org.nuiton.util.beans.BinderModelBuilderTest * </pre> @@ -94,7 +95,6 @@ * org.nuiton.util.beans.BeanMonitorTest * </pre> * - * * @since 1.1.5 */ package org.nuiton.util.beans; diff --git a/src/main/java/org/nuiton/util/converter/ColorConverter.java b/src/main/java/org/nuiton/util/converter/ColorConverter.java index e2d7da6..20aa2ea 100644 --- a/src/main/java/org/nuiton/util/converter/ColorConverter.java +++ b/src/main/java/org/nuiton/util/converter/ColorConverter.java @@ -31,8 +31,8 @@ import java.util.Scanner; /** * Converter of {@link Color}. * - * @author mallon <mallon@codelutin.com> - * @author tchemit <chemit@codelutin.com> + * @author Matthieu Allon + * @author Tony Chemit - chemit@codelutin.com * @since 2.5.3 * @deprecated since 3.0 use instead {@link org.nuiton.converter.ColorConverter} (<strong>Note:</strong> This converter is no more loaded by the {@link ConverterUtil#initConverters()}) */ diff --git a/src/main/java/org/nuiton/util/converter/ConverterUtil.java b/src/main/java/org/nuiton/util/converter/ConverterUtil.java index da174cc..0fa9b84 100644 --- a/src/main/java/org/nuiton/util/converter/ConverterUtil.java +++ b/src/main/java/org/nuiton/util/converter/ConverterUtil.java @@ -33,7 +33,7 @@ import java.util.ServiceLoader; /** * Une classe contenant des méthodes utiles sur les converters et les conversions * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 (replace {@code org.nuiton.util.ConverterUtil}). * @deprecated since 3.0 use instead {@link org.nuiton.converter.ConverterUtil} */ @@ -53,13 +53,13 @@ public class ConverterUtil { protected static Boolean WAS_INIT = Boolean.FALSE; /** - * Cherche un converter pour un <code>type</code> donné. - * <p/> + * Cherche un converter pour un {@code type} donné. + * * Recherche dans un premier temps dans les converteurs déjà connus. - * <p/> + * * Si le type est une énum et qu'aucun converter, n'a été trouvé, on * enregistre un nouveau convert d'enum. - * <p/> + * * Sinon on tente d'instancier un converteur dans le paquetage dédié aux * converteurs {@link #CONVERTER_PACKAGE}. * diff --git a/src/main/java/org/nuiton/util/converter/EnumConverter.java b/src/main/java/org/nuiton/util/converter/EnumConverter.java index 5b454b4..2ac9a0e 100644 --- a/src/main/java/org/nuiton/util/converter/EnumConverter.java +++ b/src/main/java/org/nuiton/util/converter/EnumConverter.java @@ -34,14 +34,14 @@ import static org.nuiton.i18n.I18n.t; /** * classe pour convertir une chaine en un objet Enum type-safe en * connaissant le type d'enumération utilisée {@link #enumType}. - * <p/> + * * Il est possible aussi de convertir une Enum à partir de sa valeur ordinal. - * <p/> + * * Pour enregister un nouveau convertissemnt pour un type d'Enum utiliser les * méthodes * {@link ConverterUtil#registerEnumConverter(Class)}, * et {@link ConverterUtil#registerEnumConverter(Class, Object)} . * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @see Enum * @see Enum#ordinal() * @deprecated since 3.0 use instead {@link org.nuiton.converter.EnumConverter} diff --git a/src/main/java/org/nuiton/util/converter/FormatConverter.java b/src/main/java/org/nuiton/util/converter/FormatConverter.java index d5bc7f3..5476531 100644 --- a/src/main/java/org/nuiton/util/converter/FormatConverter.java +++ b/src/main/java/org/nuiton/util/converter/FormatConverter.java @@ -20,22 +20,13 @@ * #L% */ -/* * - * FormatConverter.java - * - * Created: 14 septembre 2005 00:55:19 CEST - * - * @author Benjamin POUSSIN <poussin@codelutin.com> - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util.converter; import org.nuiton.util.converter.FormatMap.Format; /** + * Created: 14 septembre 2005 00:55:19 CEST + * <p> * Un converter est un objet qui permet de passé d'une representation d'un * objet vers une autre representation. Le mininum que converter doit savoir * faire, est de converter une representation Java vers le format qu'il @@ -44,6 +35,7 @@ import org.nuiton.util.converter.FormatMap.Format; * pour eviter une conversion supplémentaire qui pourrait-etre couteuse. * * @param <A> le type de l'objet a convertir + * @author Benjamin Poussin - poussin@codelutin.com * @deprecated since 3.0, will not pe replaced by anything (see https://forge.nuiton.org/issues/3326); will be removed later */ @Deprecated diff --git a/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java b/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java index 5429255..4bb4118 100644 --- a/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java +++ b/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java @@ -48,11 +48,10 @@ import java.util.LinkedList; * values, AppContext); * </pre> * Dans ce cas pour des raisons d'optimisation - * <p/> + * * Created: 14 septembre 2005 00:19:51 CEST * - * @author Benjamin POUSSIN <poussin@codelutin.com> - * @version $Id$ + * @author Benjamin Poussin - poussin@codelutin.com * @since 1.3 replace the class {@code org.nuiton.util.FormatConverterFactory}. * @deprecated since 3.0, will not pe replaced by anything (see https://forge.nuiton.org/issues/3326); will be removed later */ @@ -64,7 +63,7 @@ public class FormatConverterFactory { // FormatConverterFactory static protected FormatConverterFactory instance; - /** <Class, from, to -> FormatConverter> */ + /** <Class, from, to → FormatConverter> */ protected MultiKeyMap converters = new MultiKeyMap(); synchronized public static FormatConverterFactory getInstance() { diff --git a/src/main/java/org/nuiton/util/converter/FormatMap.java b/src/main/java/org/nuiton/util/converter/FormatMap.java index 71d0ef1..a4c9282 100644 --- a/src/main/java/org/nuiton/util/converter/FormatMap.java +++ b/src/main/java/org/nuiton/util/converter/FormatMap.java @@ -30,7 +30,7 @@ import java.util.Map; * est lors de l'ecriture des convertisseurs pour un nouveau format est de * créer une instance final static de {@link Format} Format pour representer * ce format - * <p/> + * * <h2>Utilisation</h2> * <pre> * FormatMap values = new FormatMap(MonObject.class); @@ -48,16 +48,15 @@ import java.util.Map; * cette representation Java, on recupere la representation SQL. Bien sur * Si le convertisseur SQL, peut directement convertir le XML en SQL, alors * la conversion Java ne sera pas faite. - * <p/> + * * Il est souvent plus simple de faire une petite classe avec les methodes * getSQL() et getXML(), qui retourne les valeurs directement dans le bon type * et qui n'ont pas besoin d'argument. - * <p/> - * <p/> + * + * * Created: 16 septembre 2005 10:41:58 CEST * - * @author Benjamin POUSSIN <poussin@codelutin.com> - * @version $Id$ + * @author Benjamin Poussin - poussin@codelutin.com * @since 1.3 (replace {@code org.nuiton.util.FormatMap} class). * @deprecated since 3.0, will not pe replaced by anything (see https://forge.nuiton.org/issues/3326); will be removed later */ diff --git a/src/main/java/org/nuiton/util/converter/KeyStrokeConverter.java b/src/main/java/org/nuiton/util/converter/KeyStrokeConverter.java index 0b2355a..4d9feee 100644 --- a/src/main/java/org/nuiton/util/converter/KeyStrokeConverter.java +++ b/src/main/java/org/nuiton/util/converter/KeyStrokeConverter.java @@ -21,18 +21,19 @@ */ package org.nuiton.util.converter; -import javax.swing.KeyStroke; import org.apache.commons.beanutils.ConversionException; import org.apache.commons.beanutils.Converter; import org.apache.commons.logging.Log; +import javax.swing.KeyStroke; + import static org.apache.commons.logging.LogFactory.getLog; import static org.nuiton.i18n.I18n.t; /** * Used to convert a {@link String} to {@link KeyStroke}. * - * @author sletellier <letellier@codelutin.com> + * @author Sylvain Letellier * @since 2.5.1 * @deprecated since 3.0 use instead {@link org.nuiton.converter.KeyStrokeConverter} (<strong>Note:</strong> This converter is no more loaded by the {@link ConverterUtil#initConverters()}) */ diff --git a/src/main/java/org/nuiton/util/converter/URIConverter.java b/src/main/java/org/nuiton/util/converter/URIConverter.java index c2c8bca..61a906f 100644 --- a/src/main/java/org/nuiton/util/converter/URIConverter.java +++ b/src/main/java/org/nuiton/util/converter/URIConverter.java @@ -35,7 +35,7 @@ import static org.nuiton.i18n.I18n.t; /** * classe pour convertir une chaine en un objet URI. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 (replace {@code org.nuiton.util.URIConverter}). * @deprecated since 3.0 use instead {@link org.nuiton.converter.URIConverter} (<strong>Note:</strong> This converter is no more loaded by the {@link ConverterUtil#initConverters()}) */ diff --git a/src/main/java/org/nuiton/util/converter/URLConverter.java b/src/main/java/org/nuiton/util/converter/URLConverter.java index dd152aa..a4c85d2 100644 --- a/src/main/java/org/nuiton/util/converter/URLConverter.java +++ b/src/main/java/org/nuiton/util/converter/URLConverter.java @@ -35,7 +35,7 @@ import static org.nuiton.i18n.I18n.t; /** * classe pour convertir une chaine en un objet URL. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 (replace {@code org.nuiton.util.URLConverter}). * @deprecated since 3.0 use instead {@link org.nuiton.converter.URLConverter} (<strong>Note:</strong> This converter is no more loaded by the {@link ConverterUtil#initConverters()}) */ diff --git a/src/main/java/org/nuiton/util/converter/VersionConverter.java b/src/main/java/org/nuiton/util/converter/VersionConverter.java index d35f55e..6d12f5a 100644 --- a/src/main/java/org/nuiton/util/converter/VersionConverter.java +++ b/src/main/java/org/nuiton/util/converter/VersionConverter.java @@ -34,7 +34,7 @@ import static org.nuiton.i18n.I18n.t; /** * classe pour convertir une chaine en un objet Version. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @see Version * @since 1.3 (replace {@code org.nuiton.util.VersionConverter}). * @deprecated since 3.0, prefer use the {@link org.nuiton.util.version.VersionConverter}. diff --git a/src/main/java/org/nuiton/util/converter/package-info.java b/src/main/java/org/nuiton/util/converter/package-info.java index f439c98..8a430c9 100644 --- a/src/main/java/org/nuiton/util/converter/package-info.java +++ b/src/main/java/org/nuiton/util/converter/package-info.java @@ -22,18 +22,18 @@ /** * * This package contains the converter api + the format api. - * <p/> + * * <h1>Converter api</h1> * This converter api is based on the * http://commons.apache.org/beanutils {@code commons-beanutils}. - * <p/> + * * Use the {@link org.nuiton.util.converter.ConverterUtil} to register or obtain a * converter. * - * <h1<Format api</h1> + * <h1>Format api</h1> * see {@link org.nuiton.util.converter.FormatConverter} and others * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 * @deprecated since 3.0 (see https://forge.nuiton.org/issues/3320), will be removed after version 3.0 */ diff --git a/src/main/java/org/nuiton/util/pagination/PaginationParameter.java b/src/main/java/org/nuiton/util/pagination/PaginationParameter.java index ce421cd..e2d52fa 100644 --- a/src/main/java/org/nuiton/util/pagination/PaginationParameter.java +++ b/src/main/java/org/nuiton/util/pagination/PaginationParameter.java @@ -22,15 +22,15 @@ package org.nuiton.util.pagination; * #L% */ +import com.google.common.base.Preconditions; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + import java.io.Serializable; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import com.google.common.base.Preconditions; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; - /** * This class represents the necessary information to do pagination (page number, size, ...). * @@ -83,7 +83,7 @@ public class PaginationParameter implements Serializable { /** * Method to create a PaginationParameter based on pageNumber, pageSize and a single order clause. - * <p/> + * * If you have an unknown number of order clauses, you should use the {@link #builder(int, int)} * method together with {@link PaginationParameterBuilder#addOrder(String, boolean)} and * {@link PaginationParameterBuilder#build()} methods. @@ -105,7 +105,7 @@ public class PaginationParameter implements Serializable { /** * Method to create a PaginationParameter based on pageNumber, pageSize and two order clauses. - * <p/> + * * If you have an unknown number of order clauses, you should use the {@link #builder(int, int)} * method together with {@link PaginationParameterBuilder#addOrder(String, boolean)} and * {@link PaginationParameterBuilder#build()} methods. @@ -131,7 +131,7 @@ public class PaginationParameter implements Serializable { /** * Method to create a PaginationParameter based on pageNumber, pageSize and three order clauses. - * <p/> + * * If you have more order clauses, or an unknown number of clauses, you should use the {@link #builder(int, int)} * method together with {@link PaginationParameterBuilder#addOrder(String, boolean)} and * {@link PaginationParameterBuilder#build()} methods. diff --git a/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutor.java b/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutor.java index 875d114..a7c4126 100644 --- a/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutor.java +++ b/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutor.java @@ -27,7 +27,7 @@ import java.rmi.RemoteException; /** * This class will act as an InvocationHandler except that it is distributed. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public interface RemoteMethodExecutor extends Remote { diff --git a/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutorImpl.java b/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutorImpl.java index 6981726..7811173 100644 --- a/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutorImpl.java +++ b/src/main/java/org/nuiton/util/rmi/RemoteMethodExecutorImpl.java @@ -30,7 +30,7 @@ import java.rmi.RemoteException; * a RMI registry and will delegate method calls to some business service. The * service is provided in the constructor. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class RemoteMethodExecutorImpl<T> implements RemoteMethodExecutor { diff --git a/src/main/java/org/nuiton/util/rmi/RemoteProxyFactory.java b/src/main/java/org/nuiton/util/rmi/RemoteProxyFactory.java index 04fafe8..da30df7 100644 --- a/src/main/java/org/nuiton/util/rmi/RemoteProxyFactory.java +++ b/src/main/java/org/nuiton/util/rmi/RemoteProxyFactory.java @@ -37,7 +37,7 @@ import java.rmi.registry.Registry; /** * Factory to create RMI proxies to some given services. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class RemoteProxyFactory { @@ -54,7 +54,7 @@ public class RemoteProxyFactory { * * @param serviceInterface The class of the service proxy to create * @param <T> some interface class - * @return A newly created proxy which interface is <T> + * @return A newly created proxy which interface is <T> * @throws RemoteException in case the registry is not reachable * @throws NotBoundException if the default RMI name cannot be found in the * registry @@ -77,7 +77,7 @@ public class RemoteProxyFactory { * in the registry * @param serviceInterface The class of the service proxy to create * @param <T> some interface class - * @return A newly created proxy which interface is <T> + * @return A newly created proxy which interface is <T> * @throws RemoteException in case the registry is not reachable * @throws NotBoundException if the default RMI name cannot be found in the * registry diff --git a/src/main/java/org/nuiton/util/rmi/ServiceExporter.java b/src/main/java/org/nuiton/util/rmi/ServiceExporter.java index 3f19556..c181c2b 100644 --- a/src/main/java/org/nuiton/util/rmi/ServiceExporter.java +++ b/src/main/java/org/nuiton/util/rmi/ServiceExporter.java @@ -38,7 +38,7 @@ import java.rmi.server.UnicastRemoteObject; * a wrapper will be created which will be put in the RMI registry. This wrapper * will intercept calls to the service and delegate them to it. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public final class ServiceExporter { diff --git a/src/main/java/org/nuiton/util/rmi/package-info.java b/src/main/java/org/nuiton/util/rmi/package-info.java index 1d66c5d..c14098c 100644 --- a/src/main/java/org/nuiton/util/rmi/package-info.java +++ b/src/main/java/org/nuiton/util/rmi/package-info.java @@ -23,12 +23,12 @@ * This package contains classes to easily export services to a RMI registry * then get a proxy to access them. The provided classes will hide RMI * complexity. - * <p/> + * * Use the {@link org.nuiton.util.rmi.ServiceExporter} to register an service to the RMI registry. - * <p/> + * * Use the {@link org.nuiton.util.rmi.RemoteProxyFactory} to get a proxy an call the RMI exported * service. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ package org.nuiton.util.rmi; diff --git a/src/main/java/org/nuiton/util/version/SemVer.java b/src/main/java/org/nuiton/util/version/SemVer.java index e185752..2d74a5e 100644 --- a/src/main/java/org/nuiton/util/version/SemVer.java +++ b/src/main/java/org/nuiton/util/version/SemVer.java @@ -38,12 +38,13 @@ import java.util.regex.Pattern; * pour modifier un de ses elements * * Quelques changement par rapport au site: + * <ul> * <li> le numero de version peut avoir entre 1 et N element, et non pas 3 obligatoirement * <li> on peut avoir un -SNAPSHOT ajoute en toute fin de la version - * + * </ul> * Un SemVer est en plusieurs elements dont chaque element peut avoir plusieurs * composant. Les composants sont utilise le meme separateur '.'. - * + * <ul> * <li> version: 1 à N composant numerique, les 3 premiers sont nomme * <ul> * <li> major @@ -53,26 +54,23 @@ import java.util.regex.Pattern; * <li> prerelease: 0 à N composant alphanumerique, le prefix est '-' * <li> build: 0 à N composant alphanumerique, le prefix est '+' * <li> SNAPSHOT: 0 ou 1 composant dont le nom est fixe le prefix est '-' + * </ul> + * Le mieux pour construire ou modifier un SemVer est d'utilise une methode creator: + * <ul> + * <li> SemVer.creator(1,2,3).done() → "1.2.3" + * <li> SemVer.creator("1.2.3","rc2").done() → "1.2.3-rc2" + * <li> SemVer.creator().setVersion(2.3.4).setBuild("r223").done() → "2.3.4+r223" + * <li> SemVer.creator().setVersion(2.3.4).setSnapshot(true).done() → "2.3.4-SNAPSHOT" + * <li> SemVer.creator(new SemVer("1.2.3")).incMajor().done() → "2.2.2" + * <li> new SemVer("1.2.3").getCreator().incMinor().setPrerelease(beta).done() → "1.3.3-beta" + * </ul> * - * Le mieux pour construire ou modifier un SemVer est d'utilise une methode - * creator: - * <li> SemVer.creator(1,2,3).done() => "1.2.3" - * <li> SemVer.creator("1.2.3","rc2").done() => "1.2.3-rc2" - * <li> SemVer.creator().setVersion(2.3.4).setBuild("r223").done() => "2.3.4+r223" - * <li> SemVer.creator().setVersion(2.3.4).setSnapshot(true).done() => "2.3.4-SNAPSHOT" - * <li> SemVer.creator(new SemVer("1.2.3")).incMajor().done() => "2.2.2" - * <li> new SemVer("1.2.3").getCreator().incMinor().setPrerelease(beta).done() => "1.3.3-beta" - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ + * @author Benjamin Poussin - poussin@codelutin.com * @since 2.6.7 */ public class SemVer implements Comparable<SemVer> { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** Logger. */ static private Log log = LogFactory.getLog(SemVer.class); /** Separateur utiliser entre chaque element d'une partie */ @@ -134,7 +132,7 @@ public class SemVer implements Comparable<SemVer> { /** * @param o the other version to test - * @return <code>true</code> if current version is before the given one + * @return {@code true} if current version is before the given one */ public boolean before(SemVer o) { int result = compareTo(o); @@ -143,7 +141,7 @@ public class SemVer implements Comparable<SemVer> { /** * @param o the other version to test - * @return <code>true</code> if current version is after the given one + * @return {@code true} if current version is after the given one */ public boolean after(SemVer o) { int result = compareTo(o); @@ -256,8 +254,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de l'element - * <li>1.2.3 retourne 3 - * <li>99.100 retourne 2 + * <ul> + * <li>1.2.3 retourne 3</li> + * <li>99.100 retourne 2</li> + * </ul> * * @return */ @@ -291,8 +291,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la version - * <li>1.2.3 retourne 3 - * <li>99.100 retourne 2 + * <ul> + * <li>1.2.3 retourne 3</li> + * <li>99.100 retourne 2</li> + * </ul> * * @return */ @@ -332,8 +334,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la Prerelease - * <li>1.2.3 retourne 3 - * <li>99.100 retourne 2 + * <ul> + * <li>1.2.3 retourne 3</li> + * <li>99.100 retourne 2</li> + * </ul> * * @return */ @@ -358,8 +362,10 @@ public class SemVer implements Comparable<SemVer> { /** * Donne le nombre de composante de la Prerelease - * <li>1.2.3 retourne 3 - * <li>99.100 retourne 2 + * <ul> + * <li>1.2.3 retourne 3</li> + * <li>99.100 retourne 2</li> + * </ul> * * @return */ diff --git a/src/main/java/org/nuiton/util/version/Version.java b/src/main/java/org/nuiton/util/version/Version.java index 8d52dbf..56ab469 100644 --- a/src/main/java/org/nuiton/util/version/Version.java +++ b/src/main/java/org/nuiton/util/version/Version.java @@ -53,7 +53,7 @@ import java.util.List; * </p> * <h4>Snapshot flag</h4> * Additionnaly version can be qualifed as a {@code SNAPSHOT} (see below section about ordering). - * <h3Examples</h3> + * <h3>Examples</h3> * <pre> * 0 (one componant 0) * 0-SNAPSHOT (one componant 0 + SNAPSHOT flag) @@ -71,7 +71,7 @@ import java.util.List; * The version is immutable, to create or modify a version, use the {@link VersionBuilder} API * or shortcut methods in {@link Versions}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @see VersionBuilder * @see VersionComparator * @since 3.0 @@ -188,12 +188,12 @@ public class Version implements Comparable<Version>, Serializable { /** * Convert the string representation to a java identifier compliant. - * <p/> + * * <ul> * <li>in java: {@code .} is forbidden</li> * <li>in database (mysql, h2 ...): {@code .} is forbidden</li> * </ul> - * <p/> + * * Forbidden values are replaced by {@code _} character. * * @return the java compilant string representation of the version @@ -211,14 +211,14 @@ public class Version implements Comparable<Version>, Serializable { /** * Creates a new version from this one incremented. - * <p/> + * * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * <p/> + * * Example: * <ul> - * <li>1 -> 2</li> - * <li>1-a -> 1-a.1</li> + * <li>1 → 2</li> + * <li>1-a → 1-a.1</li> * </ul> * * @return the incremented version @@ -234,14 +234,14 @@ public class Version implements Comparable<Version>, Serializable { /** * Creates a new version from this one incremented. - * <p/> + * * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * <p/> + * * Example: * <ul> - * <li>1 -> 2</li> - * <li>1-a -> 1-a.1</li> + * <li>1 → 2</li> + * <li>1-a → 1-a.1</li> * </ul> * * @param componantSeperator the componant separator to use the last componant is a classifier @@ -258,7 +258,7 @@ public class Version implements Comparable<Version>, Serializable { /** * Creates a new version from this one with the number componant incremented at the given position. - * <p/> + * * <strong>Note:</strong> * Will fail if the componant at the required position is not a number. * @@ -276,7 +276,7 @@ public class Version implements Comparable<Version>, Serializable { /** * Creates a new version from this one with the number componant decremented at the given position. - * <p/> + * * <strong>Note:</strong> * Will fail if the componant at the required position is not a number, or his value is 0. * @@ -309,7 +309,7 @@ public class Version implements Comparable<Version>, Serializable { /** * @param o the other version to test - * @return <code>true</code> if current version is before the given one + * @return {@code true} if current version is before the given one */ public boolean before(Version o) { int result = compareTo(o); @@ -327,7 +327,7 @@ public class Version implements Comparable<Version>, Serializable { /** * @param o the other version to test - * @return <code>true</code> if current version is after the given one + * @return {@code true} if current version is after the given one */ public boolean after(Version o) { int result = compareTo(o); @@ -362,7 +362,7 @@ public class Version implements Comparable<Version>, Serializable { } - public static interface VersionComponant<C extends Comparable<C>, V extends VersionComponant> extends Serializable, Comparable<V> { + public interface VersionComponant<C extends Comparable<C>, V extends VersionComponant> extends Serializable, Comparable<V> { C getValue(); diff --git a/src/main/java/org/nuiton/util/version/VersionBuilder.java b/src/main/java/org/nuiton/util/version/VersionBuilder.java index 3903ed6..936d67c 100644 --- a/src/main/java/org/nuiton/util/version/VersionBuilder.java +++ b/src/main/java/org/nuiton/util/version/VersionBuilder.java @@ -36,7 +36,7 @@ import java.util.Set; /** * To build some {@link Version}. - * <p/> + * * <h3>General usage</h3> * Use one the {@code create} methods, custom what you need on build, and finally * use {@link #build()} method to obtain a version. @@ -50,7 +50,7 @@ import java.util.Set; * </ul> * <h3>Customize componants</h3> * TODO - * <p/> + * * Created on 7/11/14. * * @author Tony Chemit - chemit@codelutin.com diff --git a/src/main/java/org/nuiton/util/version/VersionComparator.java b/src/main/java/org/nuiton/util/version/VersionComparator.java index 9f6f46f..b969532 100644 --- a/src/main/java/org/nuiton/util/version/VersionComparator.java +++ b/src/main/java/org/nuiton/util/version/VersionComparator.java @@ -33,30 +33,30 @@ import java.util.List; /** * Comparator of {@link Version}. - * <p/> + * * You may be before this the documentation of {@link Version} object... - * <h4>Version componant ordering</h4> + * <h1>Version componant ordering</h1> * We can compare only componants of same type. - * <p/> - * Number componants use natural number ordering (0<1<2,...) (see {@link Version.NumberVersionComponant}). - * <p/> + * + * Number componants use natural number ordering (0<1<2,...) (see {@link Version.NumberVersionComponant}). + * * String componants use {@code preRelease} flag order (preRelease is before any other string componant) then natural character ordering of the {@code lowerCase} componant value. (see {@link Version.StringVersionComponant}). - * <pre>alpha == Alpha, aa > rc</pre> - * <h4>Snapshot ordering</h4> + * <pre>alpha == Alpha, aa > rc</pre> + * <h2>Snapshot ordering</h2> * A {@code snapshot} version is before the exact same version without the flag. - * <pre>1.1-SNAPSHOT < 1.1</pre> - * <h4>General ordering algorithm</h4> + * <pre>1.1-SNAPSHOT < 1.1</pre> + * <h2>General ordering algorithm</h2> * We compare version componants at same position until there is a difference. - * <p/> + * * If common componants of version are both equals, have a look to the next componant of the longuest version * (if the version have the same componants size, Versions are equals!). - * <p/> + * * If the next componant is a number, the longuest version is after the other one: - * <pre>1 < 1.0</pre> + * <pre>1 < 1.0</pre> * If the next componant is a classifier, we consider the componant {@code preRelease} flag, * if setted then the longuest version is before the other one, if no, after: - * <pre>1-alpha < 1 < 1-aa</pre> - * <h4>Examples</h4> + * <pre>1-alpha < 1 < 1-aa</pre> + * <h2>Examples</h2> * Here is a list of ordered versions: * <pre> * 0-SNAPSHOT diff --git a/src/main/java/org/nuiton/util/version/VersionConverter.java b/src/main/java/org/nuiton/util/version/VersionConverter.java index 204267f..1eb62ee 100644 --- a/src/main/java/org/nuiton/util/version/VersionConverter.java +++ b/src/main/java/org/nuiton/util/version/VersionConverter.java @@ -30,7 +30,7 @@ import org.nuiton.converter.NuitonConverter; /** * To convert {@link Version} using {@link Converter} API. - * <p/> + * * Created on 7/11/14. * * @author Tony Chemit - chemit@codelutin.com diff --git a/src/main/java/org/nuiton/util/version/Versions.java b/src/main/java/org/nuiton/util/version/Versions.java index 2afd0ac..189a14d 100644 --- a/src/main/java/org/nuiton/util/version/Versions.java +++ b/src/main/java/org/nuiton/util/version/Versions.java @@ -164,14 +164,14 @@ public class Versions { /** * Creates a new version from this one incremented. - * <p/> + * * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * <p/> + * * Example: * <ul> - * <li>1 -> 2</li> - * <li>1-a -> 1-a.1</li> + * <li>1 → 2</li> + * <li>1-a → 1-a.1</li> * </ul> * * @return the incremented version @@ -185,14 +185,14 @@ public class Versions { /** * Creates a new version from this one incremented. - * <p/> + * * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * <p/> + * * Example: * <ul> - * <li>1 -> 2</li> - * <li>1-a -> 1-a.1</li> + * <li>1 → 2</li> + * <li>1-a → 1-a.1</li> * </ul> * * @param componantSeperator the componant separator to use the last componant is a classifier @@ -230,7 +230,7 @@ public class Versions { /** * Creates a new version from this one with the number componant incremented at the given position. - * <p/> + * * <strong>Note:</strong> * Will fail if the componant at the required position is not a number. * @@ -252,7 +252,7 @@ public class Versions { /** * Creates a new version from this one with the number componant decremented at the given position. - * <p/> + * * <strong>Note:</strong> * Will fail if the componant at the required position is not a number, or his value is 0. * diff --git a/src/test/java/org/nuiton/util/AliasMapTest.java b/src/test/java/org/nuiton/util/AliasMapTest.java index bacd411..4f90e8f 100644 --- a/src/test/java/org/nuiton/util/AliasMapTest.java +++ b/src/test/java/org/nuiton/util/AliasMapTest.java @@ -23,24 +23,22 @@ package org.nuiton.util; */ -import java.util.Arrays; -import java.util.Collection; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Assert; import org.junit.Test; +import java.util.Arrays; +import java.util.Collection; + /** - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ + * @author Benjamin Poussin - poussin@codelutin.com */ public class AliasMapTest { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(AliasMapTest.class); protected Object[] toArray(Collection c) { diff --git a/src/test/java/org/nuiton/util/CallAnalyseTest.java b/src/test/java/org/nuiton/util/CallAnalyseTest.java index 540ab8b..983e25a 100644 --- a/src/test/java/org/nuiton/util/CallAnalyseTest.java +++ b/src/test/java/org/nuiton/util/CallAnalyseTest.java @@ -20,17 +20,6 @@ * #L% */ -/* * - * CallAnalyseTest.java - * - * Created: 25 août 2005 21:03:50 CEST - * - * @author Benjamin POUSSIN <poussin@codelutin.com> - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import junit.framework.TestCase; @@ -40,9 +29,16 @@ import org.apache.commons.logging.LogFactory; import java.util.ArrayList; import java.util.List; +/** + * Created: 25 août 2005 21:03:50 CEST + * + * @author Benjamin Poussin - poussin@codelutin.com + */ public class CallAnalyseTest extends TestCase { // CallAnalyseTest - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(CallAnalyseTest.class); protected List<List<?>> memoryConsume = new ArrayList<List<?>>(); diff --git a/src/test/java/org/nuiton/util/CardinalityHelperTest.java b/src/test/java/org/nuiton/util/CardinalityHelperTest.java index 4f96289..832727a 100644 --- a/src/test/java/org/nuiton/util/CardinalityHelperTest.java +++ b/src/test/java/org/nuiton/util/CardinalityHelperTest.java @@ -27,7 +27,7 @@ import junit.framework.TestCase; /** * CardinalityHelper Tester. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @version 1.0 * @since <pre>12/17/2007</pre> */ diff --git a/src/test/java/org/nuiton/util/CategorisedListenerSetTest.java b/src/test/java/org/nuiton/util/CategorisedListenerSetTest.java index b770709..bf2e73b 100644 --- a/src/test/java/org/nuiton/util/CategorisedListenerSetTest.java +++ b/src/test/java/org/nuiton/util/CategorisedListenerSetTest.java @@ -20,23 +20,15 @@ * #L% */ -/******************************************************************************* - * CategorisedListenerSetTest.java - * - * Created: 3 janv. 2006 23:27:42 - * - * @author poussin - * - * @version $Revision$ - * - * Last update: $Date$ by : */ - package org.nuiton.util; import junit.framework.TestCase; -/** @author poussin */ - +/** + * Created: 3 janv. 2006 23:27:42 + * + * @author Benjamin Poussin - poussin@codelutin.com + */ public class CategorisedListenerSetTest extends TestCase { /* diff --git a/src/test/java/org/nuiton/util/CollectionUtilTest.java b/src/test/java/org/nuiton/util/CollectionUtilTest.java index 7f1a322..1c062d8 100644 --- a/src/test/java/org/nuiton/util/CollectionUtilTest.java +++ b/src/test/java/org/nuiton/util/CollectionUtilTest.java @@ -30,7 +30,7 @@ import java.util.List; /** * CollectionUtil Tester. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @version 1.0 * @since <pre>02/04/2008</pre> */ diff --git a/src/test/java/org/nuiton/util/FileUtilTest.java b/src/test/java/org/nuiton/util/FileUtilTest.java index 486e51d..9c2a00a 100644 --- a/src/test/java/org/nuiton/util/FileUtilTest.java +++ b/src/test/java/org/nuiton/util/FileUtilTest.java @@ -35,12 +35,10 @@ import java.util.List; import java.util.Map; /** - * FileUtilTest. - * <p/> * Created: 22 nov. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public class FileUtilTest { // FileUtilTest @@ -108,7 +106,7 @@ public class FileUtilTest { // FileUtilTest /** * Test grep on a single file. - * <p/> + * <p> * Search for grep() method count. * * @throws IOException @@ -133,7 +131,7 @@ public class FileUtilTest { // FileUtilTest /** * Test grep on a multiple files. - * <p/> + * <p> * Try to find all java file containing "CodeLutin". Can fail if some * src files are deleted. * @@ -147,7 +145,7 @@ public class FileUtilTest { // FileUtilTest Map<File, List<CharSequence>> results = FileUtil.grep("CodeLutin", rootDir, ".*\\.java", "UTF-8"); Assert.assertTrue("should have more than 50 files, but found : " + - results.size(), results.size() > 50); + results.size(), results.size() > 50); } @@ -188,7 +186,7 @@ public class FileUtilTest { // FileUtilTest /** * Test sed on a multiple files. - * <p/> + * <p> * Try to replace all "CodeLutin" by "nuiton" in all files. Can fail if some * src files are deleted. * @@ -207,7 +205,7 @@ public class FileUtilTest { // FileUtilTest Map<File, List<CharSequence>> results = FileUtil.grep("CodeLutin", testDirectory, ".*\\.java", "UTF-8"); Assert.assertTrue("should have more than 50 files, but found : " + - results.size(), results.size() > 50); + results.size(), results.size() > 50); FileUtil.sed("CodeLutin", "Nuiton", testDirectory, ".*\\.java", "UTF-8"); @@ -216,7 +214,7 @@ public class FileUtilTest { // FileUtilTest results = FileUtil.grep("Nuiton", testDirectory, ".*\\.java", "UTF-8"); Assert.assertTrue("should have more than 50 files, but found : " + - results.size(), results.size() > 50); + results.size(), results.size() > 50); // clean diff --git a/src/test/java/org/nuiton/util/LRUMapMultiKeyTest.java b/src/test/java/org/nuiton/util/LRUMapMultiKeyTest.java index 8db7c62..361518f 100644 --- a/src/test/java/org/nuiton/util/LRUMapMultiKeyTest.java +++ b/src/test/java/org/nuiton/util/LRUMapMultiKeyTest.java @@ -20,26 +20,17 @@ * #L% */ -/* * - * LRUMapMultiKeyTest.java - * - * Created: 23 mai 2006 04:57:50 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import junit.framework.TestCase; import java.util.List; - -/** @author poussin */ - +/** + * Created: 23 mai 2006 04:57:50 + * + * @author Benjamin Poussin - poussin@codelutin.com + */ public class LRUMapMultiKeyTest extends TestCase { diff --git a/src/test/java/org/nuiton/util/ListenerSetTest.java b/src/test/java/org/nuiton/util/ListenerSetTest.java index ab22734..8eb4b0e 100644 --- a/src/test/java/org/nuiton/util/ListenerSetTest.java +++ b/src/test/java/org/nuiton/util/ListenerSetTest.java @@ -27,7 +27,7 @@ * * @author Benjamin Poussin <poussin@codelutin.com> * Copyright Code Lutin - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ diff --git a/src/test/java/org/nuiton/util/MD5InputStreamTest.java b/src/test/java/org/nuiton/util/MD5InputStreamTest.java index 23eda76..808f1a1 100644 --- a/src/test/java/org/nuiton/util/MD5InputStreamTest.java +++ b/src/test/java/org/nuiton/util/MD5InputStreamTest.java @@ -31,7 +31,7 @@ import java.io.*; import java.net.URL; /** - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.2 */ public class MD5InputStreamTest { diff --git a/src/test/java/org/nuiton/util/MatrixMapTest.java b/src/test/java/org/nuiton/util/MatrixMapTest.java index bdb444c..a80fe01 100644 --- a/src/test/java/org/nuiton/util/MatrixMapTest.java +++ b/src/test/java/org/nuiton/util/MatrixMapTest.java @@ -37,15 +37,14 @@ */ package org.nuiton.util; +import org.junit.Test; + import java.util.Arrays; import java.util.List; -import org.junit.Assert; -import org.junit.Test; -import static org.junit.Assert.*; /** * - * @author poussin + * @author Benjamin Poussin - poussin@codelutin.com */ public class MatrixMapTest { diff --git a/src/test/java/org/nuiton/util/NumberUtilTest.java b/src/test/java/org/nuiton/util/NumberUtilTest.java index 00d51d3..43d6cea 100644 --- a/src/test/java/org/nuiton/util/NumberUtilTest.java +++ b/src/test/java/org/nuiton/util/NumberUtilTest.java @@ -28,7 +28,7 @@ import org.junit.Assert; import org.junit.Test; /** - * @author kmorin <kmorin@codelutin.com> + * @author Kevin Morin - morin@codelutin.com * @since 3.0 */ public class NumberUtilTest { diff --git a/src/test/java/org/nuiton/util/ObjectUtilTest.java b/src/test/java/org/nuiton/util/ObjectUtilTest.java index 3204d58..622c265 100644 --- a/src/test/java/org/nuiton/util/ObjectUtilTest.java +++ b/src/test/java/org/nuiton/util/ObjectUtilTest.java @@ -20,45 +20,33 @@ * #L% */ -/* * - * ObjectUtilTest.java - * - * Created: 19 nov. 07 12:39:28 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; -import java.io.File; +import org.junit.Assert; +import org.junit.Test; +import java.io.File; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; -import org.junit.Assert; -import org.junit.Test; - /** - * @author poussin + * Created: 19 nov. 07 12:39:28 * + * @author Benjamin Poussin - poussin@codelutin.com */ public class ObjectUtilTest extends Assert { @Test public void testCall() throws Exception { Dummy dummy = new Dummy(); - + List<Method> methods = ObjectUtil.getMethod(Dummy.class, "setfile", true); assertEquals(1, methods.size()); ObjectUtil.call(dummy, methods.get(0), "/tmp"); assertEquals(new File("/tmp"), dummy.getFile()); - + methods = ObjectUtil.getMethod(Dummy.class, "setAllFile", true); assertEquals(1, methods.size()); ObjectUtil.call(dummy, methods.get(0), "toto", "/tmp", "/tmp/titi"); @@ -99,8 +87,8 @@ public class ObjectUtilTest extends Assert { Object o = ObjectUtil.create("java.lang.StringBuffer"); assertTrue(o != null); assertTrue(o instanceof StringBuffer); - - Dummy dummy = (Dummy)ObjectUtil.create( + + Dummy dummy = (Dummy) ObjectUtil.create( "org.nuiton.util.ObjectUtilTest$Dummy(name=\"coucou le monde\", file=/tmp/fileTest, integer=50)"); assertTrue(dummy != null); assertEquals("coucou le monde", dummy.getName()); @@ -117,13 +105,13 @@ public class ObjectUtilTest extends Assert { } catch (Exception e) { assertTrue(true); } - + assertEquals(false, ObjectUtil.getNullValue(boolean.class)); assertEquals(0, ObjectUtil.getNullValue(int.class)); - assertEquals((char)0, ObjectUtil.getNullValue(char.class)); + assertEquals((char) 0, ObjectUtil.getNullValue(char.class)); assertEquals(0f, ObjectUtil.getNullValue(float.class)); assertEquals(0d, ObjectUtil.getNullValue(double.class)); - assertEquals((byte)0, ObjectUtil.getNullValue(byte.class)); + assertEquals((byte) 0, ObjectUtil.getNullValue(byte.class)); assertNull(ObjectUtil.getNullValue(Boolean.class)); assertNull(ObjectUtil.getNullValue(Integer.class)); @@ -143,14 +131,14 @@ public class ObjectUtilTest extends Assert { assertTrue(ObjectUtil.isNullValue((char) 0)); assertTrue(ObjectUtil.isNullValue(0f)); assertTrue(ObjectUtil.isNullValue(0d)); - assertTrue(ObjectUtil.isNullValue((byte)0)); + assertTrue(ObjectUtil.isNullValue((byte) 0)); assertFalse(ObjectUtil.isNullValue(Boolean.FALSE)); assertFalse(ObjectUtil.isNullValue(Integer.valueOf(0))); assertFalse(ObjectUtil.isNullValue(Character.valueOf((char) 0))); assertFalse(ObjectUtil.isNullValue(Float.valueOf(0))); assertFalse(ObjectUtil.isNullValue(Double.valueOf(0))); - assertFalse(ObjectUtil.isNullValue(Byte.valueOf((byte)0))); + assertFalse(ObjectUtil.isNullValue(Byte.valueOf((byte) 0))); } public static class Dummy { @@ -164,11 +152,11 @@ public class ObjectUtilTest extends Assert { return allFile; } - public void setAllFile(String name, File ... allFile) { + public void setAllFile(String name, File... allFile) { this.name = name; this.allFile = allFile; } - + /** * @return the file */ diff --git a/src/test/java/org/nuiton/util/PagerBeanUtilTest.java b/src/test/java/org/nuiton/util/PagerBeanUtilTest.java index 847bda6..08e58d0 100644 --- a/src/test/java/org/nuiton/util/PagerBeanUtilTest.java +++ b/src/test/java/org/nuiton/util/PagerBeanUtilTest.java @@ -29,7 +29,7 @@ import org.junit.Test; /** * Test {@link PagerBeanUtil}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.6.6 */ public class PagerBeanUtilTest { diff --git a/src/test/java/org/nuiton/util/RecursivePropertiesTest.java b/src/test/java/org/nuiton/util/RecursivePropertiesTest.java index a7e766b..0be6157 100644 --- a/src/test/java/org/nuiton/util/RecursivePropertiesTest.java +++ b/src/test/java/org/nuiton/util/RecursivePropertiesTest.java @@ -22,20 +22,17 @@ package org.nuiton.util; -import java.io.FileInputStream; -import java.io.IOException; - import org.junit.Assert; import org.junit.Test; +import java.io.FileInputStream; +import java.io.IOException; + /** * Test recursives properties class. * * @author chatellier - * @version $Revision$ - * - * Last update : $Date$ - * By : */ + */ public class RecursivePropertiesTest { /** diff --git a/src/test/java/org/nuiton/util/ReflectUtilTest.java b/src/test/java/org/nuiton/util/ReflectUtilTest.java index 4e738f0..81ce274 100644 --- a/src/test/java/org/nuiton/util/ReflectUtilTest.java +++ b/src/test/java/org/nuiton/util/ReflectUtilTest.java @@ -33,7 +33,7 @@ import java.util.Set; /** * To test the class {@link ReflectUtil}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.0 */ public class ReflectUtilTest { diff --git a/src/test/java/org/nuiton/util/ResourceTest.java b/src/test/java/org/nuiton/util/ResourceTest.java index 32a49c1..14cfed4 100644 --- a/src/test/java/org/nuiton/util/ResourceTest.java +++ b/src/test/java/org/nuiton/util/ResourceTest.java @@ -40,7 +40,7 @@ import java.util.List; * Test class for {@link Resource}. * * @author chatellier - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com */ public class ResourceTest { // ResourceTest diff --git a/src/test/java/org/nuiton/util/ReverseFileReaderTest.java b/src/test/java/org/nuiton/util/ReverseFileReaderTest.java index 2535042..1ab31dc 100644 --- a/src/test/java/org/nuiton/util/ReverseFileReaderTest.java +++ b/src/test/java/org/nuiton/util/ReverseFileReaderTest.java @@ -22,21 +22,17 @@ package org.nuiton.util; -import java.io.IOException; -import java.net.URL; - import org.junit.Assert; - import org.junit.Test; +import java.io.IOException; +import java.net.URL; + /** * Test for reverse reader utility. * * @author chatellier - * @version $Revision$ - * - * Last update : $Date$ - * By : */ + */ public class ReverseFileReaderTest { /** diff --git a/src/test/java/org/nuiton/util/SemVerTest.java b/src/test/java/org/nuiton/util/SemVerTest.java index 693e567..112f44b 100644 --- a/src/test/java/org/nuiton/util/SemVerTest.java +++ b/src/test/java/org/nuiton/util/SemVerTest.java @@ -31,17 +31,15 @@ import org.junit.Test; import java.util.Arrays; /** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ + * @author Benjamin Poussin - poussin@codelutin.com * @deprecated since 3.0 (use now {@link org.nuiton.util.version.SemVerTest}. */ @Deprecated public class SemVerTest { - /** to use log facility, just put in your code: log.info(\"...\"); */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(SemVerTest.class); /** @@ -128,9 +126,9 @@ public class SemVerTest { for (int i = 1; i < testIncValue.length; i++) { SemVer version = new SemVer(testIncValue[i][0]); Assert.assertEquals(String.format( - "Le nombre de composante doit correspondre au nombre de test a faire %s", - Arrays.toString(testIncValue[i])), - testIncValue[i].length - 1, version.getVersionCount()); + "Le nombre de composante doit correspondre au nombre de test a faire %s", + Arrays.toString(testIncValue[i])), + testIncValue[i].length - 1, version.getVersionCount()); for (int x = 1; x < testIncValue[i].length; x++) { SemVer expected = new SemVer(testIncValue[i][x]); SemVer inc = SemVer.creator(version).incVersion(x - 1, 1).done(); @@ -191,9 +189,9 @@ public class SemVerTest { int expected = -1; Assert.assertTrue(String.format( - "Bad compare: Compare(%s, %s) = %s, expected %s", - vi, vj, result, expected), - expected == result); + "Bad compare: Compare(%s, %s) = %s, expected %s", + vi, vj, result, expected), + expected == result); // System.out.println(String.format( // "Good compare: Compare(%s, %s) = %s, expected %s", // vi, vj, result, expected)); @@ -210,9 +208,9 @@ public class SemVerTest { int expected = Integer.valueOf(i).compareTo(j); // AThimel 2013/02/26 Rewritten for JDK6 compatibility. Was: Integer.compare(i, j); Assert.assertTrue(String.format( - "Bad compare: Compare(%s, %s) = %s, expected %s", - vi, vj, result, expected), - expected == result); + "Bad compare: Compare(%s, %s) = %s, expected %s", + vi, vj, result, expected), + expected == result); } } } diff --git a/src/test/java/org/nuiton/util/StringUtilTest.java b/src/test/java/org/nuiton/util/StringUtilTest.java index 7a5f1b4..cbf4719 100644 --- a/src/test/java/org/nuiton/util/StringUtilTest.java +++ b/src/test/java/org/nuiton/util/StringUtilTest.java @@ -26,24 +26,24 @@ * Created: 7 oct. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> - * @version $Revision$ + * * * Mise a jour: $Date$ * par : */ package org.nuiton.util; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import org.junit.Assert; +import org.junit.Test; import java.awt.Color; import java.util.Arrays; import java.util.Locale; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; public class StringUtilTest { private static final String[] EMPTY_STRING_ARRAY = new String[0]; // StringUtilTest diff --git a/src/test/java/org/nuiton/util/TransparenteReferenceTest.java b/src/test/java/org/nuiton/util/TransparenteReferenceTest.java index f804051..df2d8cc 100644 --- a/src/test/java/org/nuiton/util/TransparenteReferenceTest.java +++ b/src/test/java/org/nuiton/util/TransparenteReferenceTest.java @@ -20,17 +20,6 @@ * #L% */ -/* * - * TransparenteReferenceTest.java - * - * Created: 22 mai 2006 15:41:49 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : */ - package org.nuiton.util; import junit.framework.TestCase; @@ -39,8 +28,11 @@ import java.util.HashMap; import java.util.Map; -/** @author poussin */ - +/** + * Created: 22 mai 2006 15:41:49 + * + * @author Benjamin Poussin - poussin@codelutin.com + */ public class TransparenteReferenceTest extends TestCase { public void testHash() { diff --git a/src/test/java/org/nuiton/util/VersionTest.java b/src/test/java/org/nuiton/util/VersionTest.java index 96d47b5..cb6f3a1 100644 --- a/src/test/java/org/nuiton/util/VersionTest.java +++ b/src/test/java/org/nuiton/util/VersionTest.java @@ -22,17 +22,20 @@ package org.nuiton.util; +import org.junit.Test; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import org.junit.Test; -import static org.nuiton.util.VersionUtilTest.*; -import static org.junit.Assert.*; + +import static org.junit.Assert.assertEquals; +import static org.nuiton.util.VersionUtilTest.VERSIONS; +import static org.nuiton.util.VersionUtilTest.compareVersions; /** * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.1.0 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.VersionTest}). */ diff --git a/src/test/java/org/nuiton/util/VersionUtilTest.java b/src/test/java/org/nuiton/util/VersionUtilTest.java index 7ae5f28..983af76 100644 --- a/src/test/java/org/nuiton/util/VersionUtilTest.java +++ b/src/test/java/org/nuiton/util/VersionUtilTest.java @@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.1.0 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.VersionTest}). */ diff --git a/src/test/java/org/nuiton/util/ZipUtilTest.java b/src/test/java/org/nuiton/util/ZipUtilTest.java index 0ac434d..999d5ad 100644 --- a/src/test/java/org/nuiton/util/ZipUtilTest.java +++ b/src/test/java/org/nuiton/util/ZipUtilTest.java @@ -38,23 +38,19 @@ import java.util.Collections; import java.util.List; /** - * ZipUtilTest.java - * <p/> * Created: 24 août 2006 10:47:21 * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : + * @author Benjamin Poussin - poussin@codelutin.com */ public class ZipUtilTest { - /** Logger. */ + /** + * Logger. + */ private static Log log = LogFactory.getLog(ZipUtilTest.class); protected static final File DIR = new File(System.getProperty("java.home"), - "bin"); + "bin"); protected static File testWorkDir; @@ -71,8 +67,8 @@ public class ZipUtilTest { } File basedirFile = new File(basedir); testWorkDir = new File(basedirFile, - "target" + File.separator + - "surefire-workdir"); + "target" + File.separator + + "surefire-workdir"); boolean b = testWorkDir.exists() || testWorkDir.mkdirs(); if (!b) { @@ -81,10 +77,10 @@ public class ZipUtilTest { } testResourcesDir = new File(basedirFile, - "src" + File.separator + - "test" + File.separator + - "resources" + File.separator + - "zip"); + "src" + File.separator + + "test" + File.separator + + "resources" + File.separator + + "zip"); } protected File createTempFile(String prefix, String suffix) throws IOException { diff --git a/src/test/java/org/nuiton/util/beans/BeanC.java b/src/test/java/org/nuiton/util/beans/BeanC.java index cee9207..86041fe 100644 --- a/src/test/java/org/nuiton/util/beans/BeanC.java +++ b/src/test/java/org/nuiton/util/beans/BeanC.java @@ -27,7 +27,7 @@ import java.beans.PropertyChangeSupport; /** * To test http://nuiton.org/issues/2178. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.5.1 */ public class BeanC { diff --git a/src/test/java/org/nuiton/util/beans/BeanMonitorTest.java b/src/test/java/org/nuiton/util/beans/BeanMonitorTest.java index 3ed9aee..fc20711 100644 --- a/src/test/java/org/nuiton/util/beans/BeanMonitorTest.java +++ b/src/test/java/org/nuiton/util/beans/BeanMonitorTest.java @@ -29,8 +29,8 @@ import java.util.Map; /** * Tests {@link BeanMonitor}. * - * @author tchemit <chemit@codelutin.com> - * @serial $Id$ + * @author Tony Chemit - chemit@codelutin.com + * @serial * @since 1.4.1 */ public class BeanMonitorTest { diff --git a/src/test/java/org/nuiton/util/beans/BeanUtilTest.java b/src/test/java/org/nuiton/util/beans/BeanUtilTest.java index f7351c0..f135816 100644 --- a/src/test/java/org/nuiton/util/beans/BeanUtilTest.java +++ b/src/test/java/org/nuiton/util/beans/BeanUtilTest.java @@ -37,7 +37,7 @@ import java.util.Set; /** * To test the {@link BeanUtil} class. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 2.0 */ public class BeanUtilTest { diff --git a/src/test/java/org/nuiton/util/beans/BinderFactoryTest.java b/src/test/java/org/nuiton/util/beans/BinderFactoryTest.java index 635fb52..516917f 100644 --- a/src/test/java/org/nuiton/util/beans/BinderFactoryTest.java +++ b/src/test/java/org/nuiton/util/beans/BinderFactoryTest.java @@ -28,7 +28,7 @@ import org.junit.Test; /** * Tests the {@link BinderFactory}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.5.3 */ diff --git a/src/test/java/org/nuiton/util/beans/BinderModelBuilderTest.java b/src/test/java/org/nuiton/util/beans/BinderModelBuilderTest.java index 178983d..685825b 100644 --- a/src/test/java/org/nuiton/util/beans/BinderModelBuilderTest.java +++ b/src/test/java/org/nuiton/util/beans/BinderModelBuilderTest.java @@ -30,7 +30,7 @@ import java.util.Map; /** * Tests the {@link BinderModelBuilder}. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.5.3 */ public class BinderModelBuilderTest { @@ -71,7 +71,7 @@ public class BinderModelBuilderTest { Assert.assertTrue(true); } - // A --> A + // A → A builderAA = BinderModelBuilder.newEmptyBuilder(BeanA.class); assertBuilder(builderAA, BeanA.class, BeanA.class); @@ -123,7 +123,7 @@ public class BinderModelBuilderTest { BeanA.PROPERTY_F ); - // A --> B + // A → B builderAB = BinderModelBuilder.newEmptyBuilder(BeanA.class, BeanB.class); assertBuilder(builderAB, BeanA.class, BeanB.class); @@ -157,7 +157,7 @@ public class BinderModelBuilderTest { BeanB.PROPERTY_F2 ); - // B --> B + // B → B builderBB = BinderModelBuilder.newEmptyBuilder(BeanB.class); assertBuilder(builderBB, BeanB.class, BeanB.class); @@ -235,7 +235,7 @@ public class BinderModelBuilderTest { BeanB.PROPERTY_F2 ); - // B --> A + // B → A builderBA = BinderModelBuilder.newEmptyBuilder(BeanB.class, BeanA.class); assertBuilder(builderBA, BeanB.class, BeanA.class); @@ -296,7 +296,7 @@ public class BinderModelBuilderTest { Assert.assertTrue(true); } - // A --> A + // A → A builderAA = BinderModelBuilder.newDefaultBuilder(BeanA.class); assertBuilder(builderAA, BeanA.class, BeanA.class); @@ -320,7 +320,7 @@ public class BinderModelBuilderTest { BeanA.PROPERTY_F ); - // A --> B + // A → B builderAB = BinderModelBuilder.newDefaultBuilder(BeanA.class, BeanB.class); assertBuilder(builderAB, BeanA.class, BeanB.class); @@ -333,7 +333,7 @@ public class BinderModelBuilderTest { BeanA.PROPERTY_F ); - // B --> B + // B → B builderBB = BinderModelBuilder.newDefaultBuilder(BeanB.class); assertBuilder(builderBB, BeanB.class, BeanB.class); @@ -370,7 +370,7 @@ public class BinderModelBuilderTest { BeanB.PROPERTY_F2 ); - // B --> A + // B → A builderBA = BinderModelBuilder.newDefaultBuilder(BeanB.class, BeanA.class); assertBuilder(builderBA, BeanB.class, BeanA.class); @@ -562,7 +562,7 @@ public class BinderModelBuilderTest { // This is test for http://nuiton.org/issues/1913 - // A --> AA + // A → AA BinderModelBuilder<BeanA, BeanAA> builderAAA; diff --git a/src/test/java/org/nuiton/util/beans/BinderTest.java b/src/test/java/org/nuiton/util/beans/BinderTest.java index dc47bfd..b2daae4 100644 --- a/src/test/java/org/nuiton/util/beans/BinderTest.java +++ b/src/test/java/org/nuiton/util/beans/BinderTest.java @@ -60,7 +60,7 @@ public class BinderTest { // remove all previous models from the factory BinderFactory.clear(); - // creates a mirrored binder model from A -> A with only one property + // creates a mirrored binder model from A → A with only one property BinderModelBuilder<BeanA, BeanA> builder = BinderModelBuilder.newEmptyBuilder(BeanA.class). @@ -69,7 +69,7 @@ public class BinderTest { // register the model into factory BinderFactory.registerBinderModel(builder); - // creates a binder model from A -> B with more properties + // creates a binder model from A → B with more properties BinderModelBuilder<BeanA, BeanB> builder1 = BinderModelBuilder.newEmptyBuilder(BeanA.class, BeanB.class). @@ -80,7 +80,7 @@ public class BinderTest { // register the model into factory BinderFactory.registerBinderModel(builder1); - // creates a binder model from A -> B with more properties + // creates a binder model from A → B with more properties BinderModelBuilder<BeanC, BeanC> builder2 = BinderModelBuilder.newEmptyBuilder(BeanC.class, BeanC.class). @@ -103,13 +103,13 @@ public class BinderTest { @Before public void setUp() { - // get the binder A -> A + // get the binder A → A binderA = BinderFactory.newBinder(BeanA.class); - // get the binder A -> B + // get the binder A → B binderB = BinderFactory.newBinder(BeanA.class, BeanB.class); - // get the binder C -> C + // get the binder C → C binderC = BinderFactory.newBinder(BeanC.class); a = new BeanA(); diff --git a/src/test/java/org/nuiton/util/converter/ConverterUtilTest.java b/src/test/java/org/nuiton/util/converter/ConverterUtilTest.java index 2c1245d..d9b5d04 100644 --- a/src/test/java/org/nuiton/util/converter/ConverterUtilTest.java +++ b/src/test/java/org/nuiton/util/converter/ConverterUtilTest.java @@ -31,7 +31,7 @@ import org.nuiton.util.Version; /** * ConverterUtil Tester. * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @version 1.3 (replace class {@code org.nuiton.util.ConverterUtilTest}). * @since <pre>02/13/2008</pre> */ diff --git a/src/test/java/org/nuiton/util/converter/UnregistreableConverter.java b/src/test/java/org/nuiton/util/converter/UnregistreableConverter.java index a29b0a3..db6b182 100644 --- a/src/test/java/org/nuiton/util/converter/UnregistreableConverter.java +++ b/src/test/java/org/nuiton/util/converter/UnregistreableConverter.java @@ -27,7 +27,7 @@ import org.apache.commons.beanutils.Converter; /** * A converter with no getType method, so not registreable via {@link ConverterUtil#initConverters()} * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 (replace class {@code org.nuiton.util.UnregistreableConverter}). */ @Deprecated diff --git a/src/test/java/org/nuiton/util/converter/VersionConverterTest.java b/src/test/java/org/nuiton/util/converter/VersionConverterTest.java index 500c52f..39018a1 100644 --- a/src/test/java/org/nuiton/util/converter/VersionConverterTest.java +++ b/src/test/java/org/nuiton/util/converter/VersionConverterTest.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; /** * - * @author tchemit <chemit@codelutin.com> + * @author Tony Chemit - chemit@codelutin.com * @since 1.3 (replace class {@code org.nuiton.util.VersionConverterTest}). */ @Deprecated diff --git a/src/test/java/org/nuiton/util/rmi/AnyException.java b/src/test/java/org/nuiton/util/rmi/AnyException.java index 7ea0519..7f9b62c 100644 --- a/src/test/java/org/nuiton/util/rmi/AnyException.java +++ b/src/test/java/org/nuiton/util/rmi/AnyException.java @@ -22,7 +22,7 @@ package org.nuiton.util.rmi; /** - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class AnyException extends Exception { diff --git a/src/test/java/org/nuiton/util/rmi/RmiExporterAndProxyTest.java b/src/test/java/org/nuiton/util/rmi/RmiExporterAndProxyTest.java index 3d443ad..1df6b89 100644 --- a/src/test/java/org/nuiton/util/rmi/RmiExporterAndProxyTest.java +++ b/src/test/java/org/nuiton/util/rmi/RmiExporterAndProxyTest.java @@ -26,13 +26,12 @@ import org.apache.commons.logging.LogFactory; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; -import org.junit.Ignore; import java.io.InvalidObjectException; import java.rmi.NotBoundException; /** - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ @Ignore public class RmiExporterAndProxyTest { diff --git a/src/test/java/org/nuiton/util/rmi/SomeBean.java b/src/test/java/org/nuiton/util/rmi/SomeBean.java index dc44cc0..8ab7109 100644 --- a/src/test/java/org/nuiton/util/rmi/SomeBean.java +++ b/src/test/java/org/nuiton/util/rmi/SomeBean.java @@ -25,7 +25,7 @@ import java.io.Serializable; import java.util.Date; /** - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class SomeBean implements Serializable { diff --git a/src/test/java/org/nuiton/util/rmi/SomeService.java b/src/test/java/org/nuiton/util/rmi/SomeService.java index eae736d..b1fc8ab 100644 --- a/src/test/java/org/nuiton/util/rmi/SomeService.java +++ b/src/test/java/org/nuiton/util/rmi/SomeService.java @@ -24,7 +24,7 @@ package org.nuiton.util.rmi; /** * Any service interface which will be used to test the RMI proxy. * - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public interface SomeService { diff --git a/src/test/java/org/nuiton/util/rmi/SomeServiceImpl.java b/src/test/java/org/nuiton/util/rmi/SomeServiceImpl.java index dc7f56d..61679c4 100644 --- a/src/test/java/org/nuiton/util/rmi/SomeServiceImpl.java +++ b/src/test/java/org/nuiton/util/rmi/SomeServiceImpl.java @@ -24,7 +24,7 @@ package org.nuiton.util.rmi; import java.io.InvalidObjectException; /** - * @author Arnaud Thimel <thimel@codelutin.com> + * @author Arnaud Thimel - thimel@codelutin.com */ public class SomeServiceImpl implements SomeService { diff --git a/src/test/java/org/nuiton/util/version/SemVerTest.java b/src/test/java/org/nuiton/util/version/SemVerTest.java index b10ff63..3ddaf15 100644 --- a/src/test/java/org/nuiton/util/version/SemVerTest.java +++ b/src/test/java/org/nuiton/util/version/SemVerTest.java @@ -29,11 +29,7 @@ import org.junit.Test; import java.util.Arrays; /** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ + * @author Benjamin Poussin - poussin@codelutin.com */ public class SemVerTest { @@ -121,9 +117,9 @@ public class SemVerTest { for (int i = 1; i < testIncValue.length; i++) { SemVer version = new SemVer(testIncValue[i][0]); Assert.assertEquals(String.format( - "Le nombre de composante doit correspondre au nombre de test a faire %s", - Arrays.toString(testIncValue[i])), - testIncValue[i].length - 1, version.getVersionCount()); + "Le nombre de composante doit correspondre au nombre de test a faire %s", + Arrays.toString(testIncValue[i])), + testIncValue[i].length - 1, version.getVersionCount()); for (int x = 1; x < testIncValue[i].length; x++) { SemVer expected = new SemVer(testIncValue[i][x]); SemVer inc = SemVer.creator(version).incVersion(x - 1, 1).done(); @@ -184,9 +180,9 @@ public class SemVerTest { int expected = -1; Assert.assertTrue(String.format( - "Bad compare: Compare(%s, %s) = %s, expected %s", - vi, vj, result, expected), - expected == result); + "Bad compare: Compare(%s, %s) = %s, expected %s", + vi, vj, result, expected), + expected == result); // System.out.println(String.format( // "Good compare: Compare(%s, %s) = %s, expected %s", // vi, vj, result, expected)); @@ -203,9 +199,9 @@ public class SemVerTest { int expected = Integer.valueOf(i).compareTo(j); // AThimel 2013/02/26 Rewritten for JDK6 compatibility. Was: Integer.compare(i, j); Assert.assertTrue(String.format( - "Bad compare: Compare(%s, %s) = %s, expected %s", - vi, vj, result, expected), - expected == result); + "Bad compare: Compare(%s, %s) = %s, expected %s", + vi, vj, result, expected), + expected == result); } } } diff --git a/src/test/resources/org/nuiton/util/fileUtilData.txt b/src/test/resources/org/nuiton/util/fileUtilData.txt index 511bc30..c15700d 100644 --- a/src/test/resources/org/nuiton/util/fileUtilData.txt +++ b/src/test/resources/org/nuiton/util/fileUtilData.txt @@ -77,7 +77,7 @@ import java.util.regex.Pattern; * temporaire, comparaison de dates de création, récupération d'une chaîne, * d'un Reader ou d'un Writer à partir d'un fichier, récupération du fichier * saisi dans une boîte de dialogue, conversions en byte[], en Stream... - * <p/> + * * Created: 22 novembre 2004 * * @author bpoussin <poussin@codelutin.com> @@ -616,7 +616,7 @@ public class FileUtil { // FileUtil /** * Equivalent de la methode basename unix. - * basename("/tmp/toto.xml", ".xml") -> "toto" + * basename("/tmp/toto.xml", ".xml") → "toto" * * @param file le fichier dont on souhaite le nom sans le chemin * @param suffixes si present represente le suffixe a eliminer du fichier @@ -630,7 +630,7 @@ public class FileUtil { // FileUtil /** * Equivalent de la methode basename unix. - * basename("/tmp/toto.xml", ".xml") -> "toto" + * basename("/tmp/toto.xml", ".xml") → "toto" * * @param name le nom du fichier dont on souhaite le nom sans le chemin * @param suffixes si present represente le suffixe a eliminer du fichier @@ -979,7 +979,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp") donnera le repertoire * "/var/tmp/titi" * @@ -997,7 +997,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -1026,7 +1026,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * <p/> + * * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -1064,7 +1064,7 @@ public class FileUtil { // FileUtil if (renameFrom != null && renameTo != null) { String tmp = path.replaceAll(renameFrom, renameTo); if (log.isDebugEnabled()) { - log.debug("rename " + path + " -> " + tmp); + log.debug("rename " + path + " → " + tmp); } path = tmp; } @@ -1379,7 +1379,7 @@ public class FileUtil { // FileUtil /** * Obtain a file from the given {@code rootDirectory}, applying given paths. - * <p/> + * * For example with paths = a, b and c, then result is : * <pre> * root/a/b/c @@ -1400,7 +1400,7 @@ public class FileUtil { // FileUtil /** * Obtain a file fro the given {@code rootDirectory}, applying the fqn. - * <p/> + * * For example with fqn = a.b.c, the result is : * <pre> * root/a/b/c -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git commit 19ab5ac7583324af41a004bf0610e4df71854888 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:45:34 2016 +0100 Second pass to add FIXME on missing javadoc params and return (See #3797) --- src/main/java/org/nuiton/util/AliasMap.java | 25 +-- src/main/java/org/nuiton/util/ArrayUtil.java | 5 +- src/main/java/org/nuiton/util/BoundedList.java | 8 +- .../util/BoundedListOutOfBoundsException.java | 10 -- src/main/java/org/nuiton/util/CallAnalyse.java | 1 + .../java/org/nuiton/util/CardinalityHelper.java | 4 +- src/main/java/org/nuiton/util/CollectionUtil.java | 7 + src/main/java/org/nuiton/util/DateUtil.java | 14 +- src/main/java/org/nuiton/util/DigestGenerator.java | 70 ++++---- src/main/java/org/nuiton/util/FileUtil.java | 177 ++++++++++--------- src/main/java/org/nuiton/util/GZUtil.java | 22 ++- .../java/org/nuiton/util/LoggingException.java | 1 - .../org/nuiton/util/LoggingPatternFormatter.java | 67 ++++--- src/main/java/org/nuiton/util/MatrixMap.java | 194 ++++++++++++--------- src/main/java/org/nuiton/util/ObjectUtil.java | 27 +-- .../java/org/nuiton/util/ResourceException.java | 1 - .../org/nuiton/util/ResourceNotFoundException.java | 1 - src/main/java/org/nuiton/util/SemVer.java | 171 ++++++++++-------- src/main/java/org/nuiton/util/StringUtil.java | 2 +- .../java/org/nuiton/util/StringUtilException.java | 1 - src/main/java/org/nuiton/util/ZipUtil.java | 2 +- src/main/java/org/nuiton/util/beans/BeanUtil.java | 1 + src/main/java/org/nuiton/util/beans/Binder.java | 2 +- .../java/org/nuiton/util/beans/BinderFactory.java | 2 + .../org/nuiton/util/beans/BinderModelBuilder.java | 100 ++++++----- .../util/converter/FormatConverterFactory.java | 10 +- .../java/org/nuiton/util/converter/FormatMap.java | 4 +- src/main/java/org/nuiton/util/version/SemVer.java | 63 +++---- .../java/org/nuiton/util/version/Versions.java | 18 +- 29 files changed, 567 insertions(+), 443 deletions(-) diff --git a/src/main/java/org/nuiton/util/AliasMap.java b/src/main/java/org/nuiton/util/AliasMap.java index b690dc1..62a82ac 100644 --- a/src/main/java/org/nuiton/util/AliasMap.java +++ b/src/main/java/org/nuiton/util/AliasMap.java @@ -76,8 +76,9 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * * @param key identifiant unique pour cette valeur * @param value la valeur + * @param alias1 le premier alias à saisir * @param alias les alias de la valeur - * @return + * @return FIXME */ public V put(K key, V value, A alias1, A ... alias) { V result = put(key, value); @@ -88,9 +89,9 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { /** * Ajoute des alias a une cle - * @param key - * @param alias1 - * @param alias + * @param key FIXME + * @param alias1 FIXME + * @param alias FIXME */ protected void putAlias(K key, A alias1, A ... alias) { aliases.put(alias1, key); @@ -117,7 +118,7 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * </pre> * * - * @param alias + * @param alias FIXME * @return une liste vide si aucune valeur ne correspond au alias en argument */ public Collection<K> getKeyAlias(A ... alias) { @@ -154,7 +155,7 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * </pre> * * - * @param alias + * @param alias FIXME * @return une liste vide si aucune valeur ne correspond au alias en argument */ public Collection<V> getValueAlias(A ... alias) { @@ -179,8 +180,8 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * getKeyAlias(k9) retourne [] * </pre> * - * @param key - * @return + * @param key FIXME + * @return FIXME */ public Collection<A> getAlias(K key) { Collection result = keys.getCollection(key); @@ -201,8 +202,8 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * remove(K1) il reste K2: [b, c, d], K3: [c, d, e] * </pre> * - * @param key - * @return + * @param key FIXME + * @return FIXME */ @Override public V remove(Object key) { @@ -231,7 +232,7 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * removeValue(b, c) il reste K3: [c, d, e] * </pre> * - * @param alias + * @param alias FIXME * @return la liste de valeur qui a ete supprime de la map */ public Collection<V> removeValue(A ... alias) { @@ -256,7 +257,7 @@ public class AliasMap<K, V, A> extends HashMap<K, V> { * getKeyAlias(z) alors rien ne change car cette alias n'existe pas * </pre> * - * @param alias + * @param alias FIXME */ public void removeAlias(A ... alias) { for (Object a : alias) { diff --git a/src/main/java/org/nuiton/util/ArrayUtil.java b/src/main/java/org/nuiton/util/ArrayUtil.java index 3e9731d..a6870cc 100644 --- a/src/main/java/org/nuiton/util/ArrayUtil.java +++ b/src/main/java/org/nuiton/util/ArrayUtil.java @@ -23,7 +23,7 @@ /** * ArrayUtil.java - * + * <p> * Created: 31 oct. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> @@ -130,6 +130,8 @@ public class ArrayUtil { // ArrayUtil * Ajoute a un tableau un ensemble d'element. Le type du tableau retourné * est le meilleur possible. * + * @param <E> FIXME + * @param <F> FIXME * @param tab les valeurs initiales du tableau * @param elems les elemements a ajouter * @return un nouveau tableau contenant a la fin les elements souhaites @@ -145,6 +147,7 @@ public class ArrayUtil { // ArrayUtil * Recherche dans le table le 1er element qui correspond a la classe * passée en argument. * + * @param <A> FIXME * @param tab le tableau dans lequel il faut chercher * @param clazz la classe de l'objet souhaité * @return un objet de la classe demandé, ou null si aucun ne correspond diff --git a/src/main/java/org/nuiton/util/BoundedList.java b/src/main/java/org/nuiton/util/BoundedList.java index 929beb0..18d8893 100644 --- a/src/main/java/org/nuiton/util/BoundedList.java +++ b/src/main/java/org/nuiton/util/BoundedList.java @@ -64,7 +64,7 @@ public class BoundedList<E> extends ArrayList<E> { /** * Creates a new BoundedList with the specified initialCapacity. The min size is set to 0 and the max size to the infinite. * - * @param initialCapacity + * @param initialCapacity FIXME */ public BoundedList(int initialCapacity) { super(initialCapacity); @@ -78,7 +78,7 @@ public class BoundedList<E> extends ArrayList<E> { /** * Creates a new BoundedList with the specified collection of elements. The min size is set to 0 and the max size to the infinite. * - * @param arg0 + * @param arg0 FIXME */ public BoundedList(Collection<E> arg0) { super(arg0); @@ -87,8 +87,8 @@ public class BoundedList<E> extends ArrayList<E> { /** * Creates a new empty BoundedList with the specified min and max sizes. Please be informed that -1 represents the infinite. * - * @param minSize - * @param maxSize + * @param minSize FIXME + * @param maxSize FIXME */ public BoundedList(int minSize, int maxSize) { super(); diff --git a/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java b/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java index 3743ba3..bca1a89 100644 --- a/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java +++ b/src/main/java/org/nuiton/util/BoundedListOutOfBoundsException.java @@ -35,30 +35,20 @@ package org.nuiton.util; public class BoundedListOutOfBoundsException extends RuntimeException { - /** */ private static final long serialVersionUID = 7006384682459926080L; - /** - * - */ public BoundedListOutOfBoundsException() { super(); } - /** @param message */ public BoundedListOutOfBoundsException(String message) { super(message); } - /** - * @param message - * @param cause - */ public BoundedListOutOfBoundsException(String message, Throwable cause) { super(message, cause); } - /** @param cause */ public BoundedListOutOfBoundsException(Throwable cause) { super(cause); } diff --git a/src/main/java/org/nuiton/util/CallAnalyse.java b/src/main/java/org/nuiton/util/CallAnalyse.java index 2819fcd..8a4b934 100644 --- a/src/main/java/org/nuiton/util/CallAnalyse.java +++ b/src/main/java/org/nuiton/util/CallAnalyse.java @@ -87,6 +87,7 @@ public class CallAnalyse { // CallAnalyse /** * Permet de savoir si les statistiques sont activées ou non, pour le * thread courant + * @return FIXME */ public static boolean isActivate() { return stats.get().getActivated(); diff --git a/src/main/java/org/nuiton/util/CardinalityHelper.java b/src/main/java/org/nuiton/util/CardinalityHelper.java index 9e71477..0e183d5 100644 --- a/src/main/java/org/nuiton/util/CardinalityHelper.java +++ b/src/main/java/org/nuiton/util/CardinalityHelper.java @@ -86,7 +86,7 @@ public class CardinalityHelper { * * @param min le min de la cardinalité à tester * @param max le max de la cardinalité à tester - * @return {@code true} si min==0 && max==1 + * @return {@code true} si min==0 et max==1 */ public static boolean isDefaultOptional(int min, int max) { return min == 0 && max == 1; @@ -96,7 +96,7 @@ public class CardinalityHelper { * Indique si une cardinalité est obligatoire à partir de son min * * @param min le min de la cardinalité à tester - * @return {@code true} if min>0 + * @return {@code true} si min>0 */ public static boolean isMandatory(int min) { return min > 0; diff --git a/src/main/java/org/nuiton/util/CollectionUtil.java b/src/main/java/org/nuiton/util/CollectionUtil.java index 7cf792e..ce6cee2 100644 --- a/src/main/java/org/nuiton/util/CollectionUtil.java +++ b/src/main/java/org/nuiton/util/CollectionUtil.java @@ -40,6 +40,8 @@ public class CollectionUtil { /** * Ajoute a la collection tous les elements passés en parametre * + * @param <A> FIXME + * @param <E> FIXME * @param col la collection * @param e les elements a ajouter * @return la collection passé en parametre @@ -52,6 +54,8 @@ public class CollectionUtil { /** * Ajoute a la liste tous les elements passés en parametre * + * @param <A> FIXME + * @param <E> FIXME * @param col la liste * @param pos le premier index où insérer les données * @param e les elements a ajouter @@ -71,6 +75,7 @@ public class CollectionUtil { * <p> * Note : <b>Aucune liste n'est créee, ni recopiée</b> * + * @param <O> data type * @param list la liste à convertir * @param type le type des éléments de la liste * @return la liste typée @@ -102,6 +107,7 @@ public class CollectionUtil { * <p> * Note : <b>Aucune collection n'est créee, ni recopiée</b> * + * @param <O> data type * @param list la collection à convertir * @param type le type des éléments de la collection * @return la collection typée @@ -133,6 +139,7 @@ public class CollectionUtil { * <p> * Note : <b>Aucun ensemble n'est créee, ni recopiée</b> * + * @param <O> data type * @param list l'ensemble à convertir * @param type le type des éléments de l'ensemble * @return l'ensemble typée diff --git a/src/main/java/org/nuiton/util/DateUtil.java b/src/main/java/org/nuiton/util/DateUtil.java index 860985d..fbc836b 100644 --- a/src/main/java/org/nuiton/util/DateUtil.java +++ b/src/main/java/org/nuiton/util/DateUtil.java @@ -32,7 +32,7 @@ import java.util.Locale; /** * Library for manipulating dates. - * + * <p> * <b>Note: </b> * * @author fdesbois @@ -243,7 +243,7 @@ public class DateUtil { boolean result = true; result &= myDate.after(beforeDate) || myDate.compareTo(beforeDate) == 0; result &= afterDate == null || myDate.before(afterDate) || - myDate.compareTo(afterDate) == 0; + myDate.compareTo(afterDate) == 0; return result; } @@ -487,8 +487,10 @@ public class DateUtil { * Créer la date qui utilise le jour donné dans {@code day} et l'heure * donnée dans {@code time}. * - * @param day le jour à utiliser - * @param time l'heure a utiliser + * @param day le jour à utiliser + * @param time l'heure a utiliser + * @param useSecond FIXME + * @param useMiliSecond FIXME * @return la date donnée avec l'heure courante */ public static Date getDateAndTime(Date day, Date time, boolean useSecond, boolean useMiliSecond) { @@ -518,7 +520,9 @@ public class DateUtil { * Créer la date qui utilise uniquement l'heure * donnée dans {@code dayTime}. * - * @param dayTime l'heure a utiliser + * @param dayTime l'heure a utiliser + * @param useSecond FIXME + * @param useMiliSecond FIXME * @return la date donnée avec uniquement l'heure courante */ public static Date getTime(Date dayTime, boolean useSecond, boolean useMiliSecond) { diff --git a/src/main/java/org/nuiton/util/DigestGenerator.java b/src/main/java/org/nuiton/util/DigestGenerator.java index 15f2eb6..aa16592 100644 --- a/src/main/java/org/nuiton/util/DigestGenerator.java +++ b/src/main/java/org/nuiton/util/DigestGenerator.java @@ -64,10 +64,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for Document * - * @param document - * @param digestAlgorithm + * @param document FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(Document document, String digestAlgorithm) throws Exception { @@ -102,10 +102,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for Node * - * @param node - * @param digestAlgorithm + * @param node FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest value - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(Node node, String digestAlgorithm) throws Exception { if (node.getNodeType() == Node.ELEMENT_NODE) { @@ -123,10 +123,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for Element * - * @param element - * @param digestAlgorithm + * @param element FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest value - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(Element element, String digestAlgorithm) throws Exception { @@ -168,10 +168,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for ProcessingInstruction * - * @param pi - * @param digestAlgorithm + * @param pi FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest value - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(ProcessingInstruction pi, String digestAlgorithm) throws Exception { @@ -198,10 +198,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for Attr * - * @param attribute - * @param digestAlgorithm + * @param attribute FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest value - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(Attr attribute, String digestAlgorithm) throws Exception { @@ -232,10 +232,10 @@ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for Text * - * @param text - * @param digestAlgorithm + * @param text FIXME + * @param digestAlgorithm FIXME * @return Returns a byte array representing the calculated digest value - * @throws Exception + * @throws Exception FIXME */ public byte[] getDigest(Text text, String digestAlgorithm) throws Exception { byte[] digest; @@ -259,7 +259,7 @@ public class DigestGenerator { * This method is an overloaded method for getting the expanded name namespaceURI followed by the local name for * Element * - * @param element + * @param element FIXME * @return Returns the expanded name of Element */ public String getExpandedName(Element element) { @@ -270,7 +270,7 @@ public class DigestGenerator { * This method is an overloaded method for getting the expanded name namespaceURI followed by the local name for * Attr * - * @param attribute + * @param attribute FIXME * @return Returns the expanded name of the Attr */ public String getExpandedName(Attr attribute) { @@ -280,7 +280,7 @@ public class DigestGenerator { /** * Gets the collection of attributes which are none namespace declarations for an Element * - * @param element + * @param element FIXME * @return Returns the collection of attributes which are none namespace declarations */ public Collection getAttributesWithoutNS(Element element) { @@ -298,7 +298,7 @@ public class DigestGenerator { /** * Gets the valid element collection of an Document. Element and ProcessingInstruction only * - * @param document + * @param document FIXME * @return Returns a collection of ProcessingInstructions and Elements */ public Collection getValidElements(Document document) { @@ -317,7 +317,7 @@ public class DigestGenerator { /** * Gets the String representation of the byte array * - * @param array + * @param array FIXME * @return Returns the String of the byte */ public String getStringRepresentation(byte[] array) { @@ -331,11 +331,11 @@ public class DigestGenerator { /** * Compares two Nodes for the XML equality * - * @param node - * @param comparingNode - * @param digestAlgorithm + * @param node FIXME + * @param comparingNode FIXME + * @param digestAlgorithm FIXME * @return Returns true if the Node XML contents are equal - * @throws Exception + * @throws Exception FIXME */ public boolean compareNode(Node node, Node comparingNode, String digestAlgorithm) throws Exception { @@ -346,11 +346,11 @@ public class DigestGenerator { /** * Compares two Documents for the XML equality * - * @param document - * @param comparingDocument - * @param digestAlgorithm + * @param document FIXME + * @param comparingDocument FIXME + * @param digestAlgorithm FIXME * @return Returns true if the Document XML content are equal - * @throws Exception + * @throws Exception FIXME */ public boolean compareDocument(Document document, Document comparingDocument, String digestAlgorithm) @@ -362,11 +362,11 @@ public class DigestGenerator { /** * Compares two Attributes for the XML equality * - * @param attribute - * @param comparingAttribute - * @param digestAlgorithm + * @param attribute FIXME + * @param comparingAttribute FIXME + * @param digestAlgorithm FIXME * @return Returns true if the Document XML content are equal - * @throws Exception + * @throws Exception FIXME */ public boolean compareAttribute(Attr attribute, Attr comparingAttribute, String digestAlgorithm) throws Exception { diff --git a/src/main/java/org/nuiton/util/FileUtil.java b/src/main/java/org/nuiton/util/FileUtil.java index 0221cba..7799ef0 100644 --- a/src/main/java/org/nuiton/util/FileUtil.java +++ b/src/main/java/org/nuiton/util/FileUtil.java @@ -66,7 +66,7 @@ import java.util.regex.Pattern; * temporaire, comparaison de dates de création, récupération d'une chaîne, * d'un Reader ou d'un Writer à partir d'un fichier, récupération du fichier * saisi dans une boîte de dialogue, conversions en byte[], en Stream... - * + * <p> * Created: 22 novembre 2004 * * @author Benjamin Poussin - poussin@codelutin.com @@ -74,25 +74,30 @@ import java.util.regex.Pattern; */ public class FileUtil { // FileUtil - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(FileUtil.class); - /** Encoding utilisé (peut être redéfini) */ + /** + * Encoding utilisé (peut être redéfini) + */ // TODO fdesbois 2011-04-16 : Perhaps change ISO encoding by UTF-8 public static String ENCODING = "ISO-8859-1"; /** * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated protected static File currentDirectory = new File("."); /** + * @param dir FIXME * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static void setCurrentDirectory(File dir) { @@ -100,9 +105,10 @@ public class FileUtil { // FileUtil } /** + * @return FIXME * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getCurrentDirectory() { @@ -111,8 +117,8 @@ public class FileUtil { // FileUtil /** * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static class PatternChooserFilter extends javax.swing.filechooser.FileFilter { @@ -147,8 +153,8 @@ public class FileUtil { // FileUtil * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @see #getFile(javax.swing.filechooser.FileFilter...) * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(String... patternOrDescriptionFilters) { @@ -164,8 +170,8 @@ public class FileUtil { // FileUtil * @param filters les filtres a ajouter * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(javax.swing.filechooser.FileFilter... filters) { @@ -183,8 +189,8 @@ public class FileUtil { // FileUtil * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @see #getFile(javax.swing.filechooser.FileFilter...) * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(Component parent, @@ -206,8 +212,8 @@ public class FileUtil { // FileUtil * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @see #getFile(javax.swing.filechooser.FileFilter...) * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(String title, @@ -241,8 +247,8 @@ public class FileUtil { // FileUtil * @param filters les filtres a ajouter * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(Component parent, @@ -261,8 +267,8 @@ public class FileUtil { // FileUtil * @param filters les filtres a ajouter * @return le fichier accepté, ou null si rien n'est chois ou l'utilisateur a annulé * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static File getFile(String title, @@ -300,11 +306,11 @@ public class FileUtil { // FileUtil /** * @return le nom du repertoire entre dans la boite de dialogue. - * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne - * null. + * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne + * null. * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static String getDirectory() { @@ -315,11 +321,11 @@ public class FileUtil { // FileUtil * @param title le nom de la boite de dialogue * @param approvalText le texte de l'action d'acceptation du répertoire dans le file chooser * @return le nom du repertoire entre dans la boite de dialogue. - * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne - * null. + * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne + * null. * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static String getDirectory(String title, String approvalText) { @@ -332,11 +338,11 @@ public class FileUtil { // FileUtil * @param title le nom de la boite de dialogue * @param approvalText le texte de l'action d'acceptation du répertoire dans le file chooser * @return le nom du repertoire entre dans la boite de dialogue. - * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne - * null. + * Si le bouton annuler est utilisé, ou qu'il y a une erreur retourne + * null. * @deprecated since 2.6.13, prefer use same method in - * jaxx.runtime.FileChooserUtil class in jaxx-runtime project - * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} + * jaxx.runtime.FileChooserUtil class in jaxx-runtime project + * (see http://svn.nuiton.org/svn/jaxx/trunk/jaxx-runtime/src/main/java/jaxx/runtime/FileChooserUtil} */ @Deprecated public static String getDirectory(Component parent, @@ -549,7 +555,7 @@ public class FileUtil { // FileUtil public static File getTempFile(String content, String fileSuffix) throws IOException { File result = File.createTempFile("tmp-" + FileUtil.class.getName(), - fileSuffix); + fileSuffix); result.deleteOnExit(); FileUtils.write(result, content); return result; @@ -584,7 +590,7 @@ public class FileUtil { // FileUtil for (String suffixe : suffixes) { if (result.endsWith(suffixe)) { result = result.substring(0, - result.length() - suffixe.length()); + result.length() - suffixe.length()); break; } } @@ -598,7 +604,7 @@ public class FileUtil { // FileUtil * @param extchars la liste des caracteres pouvant former l'extension * dans l'ordre de preference. Si vide on utilise ".". * @return l'extension ou la chaine vide si le fichier n'a pas d'extension - * l'extension ne contient pas le chaine de delimitation + * l'extension ne contient pas le chaine de delimitation */ public static String extension(File file, String... extchars) { String name = file.getName(); @@ -613,7 +619,7 @@ public class FileUtil { // FileUtil * @param extchars la liste des caracteres pouvant former l'extension * dans l'ordre de preference. Si vide on utilise ".". * @return l'extension ou la chaine vide si le fichier n'a pas d'extension - * l'extension ne contient pas le chaine de delimitation + * l'extension ne contient pas le chaine de delimitation * @since 1.4.2 */ public static String extension(String name, String... extchars) { @@ -668,7 +674,7 @@ public class FileUtil { // FileUtil String extension = extension(name, extchars); if (extension == null) { throw new IOException("Could not find extension for name " + - name + " within " + Arrays.toString(extchars)); + name + " within " + Arrays.toString(extchars)); } String nameWithoutExtension = name.substring( 0, name.length() - extension.length()); @@ -711,8 +717,8 @@ public class FileUtil { // FileUtil * * @param directory un répertoire * @return une liste d'objet {@link File} de répertoires et ceci - * recursivement à partir de directory, si directory - * n'est pas un répertoire la liste est vide. + * recursivement à partir de directory, si directory + * n'est pas un répertoire la liste est vide. */ public static List<File> getSubDirectories(File directory) { class DirectoryFilter implements FileFilter { @@ -729,8 +735,8 @@ public class FileUtil { // FileUtil * * @param directory un répertoire * @return une liste d'objet {@link File} des fichiers et ceci - * recursivement à partir de directory, si directory n'est pas un - * répertoire la liste est vide + * recursivement à partir de directory, si directory n'est pas un + * répertoire la liste est vide */ public static List<File> getFiles(File directory) { class NormalFileFilter implements FileFilter { @@ -751,7 +757,7 @@ public class FileUtil { // FileUtil * liste résultante * @param recursively flag pour indiquer si on doit descendre dans les sous répertoires * @return une liste d'objet {@link File} qui ont s'attisfait le - * pattern. + * pattern. */ public static List<File> find(File directory, final String pattern, @@ -812,8 +818,8 @@ public class FileUtil { // FileUtil * @param f le fichier ou répertoire à partir duquel il faut commencer * @param fileAction l'action à effectuer sur chaque fichier * @return le résultat des fileAction executé sur les fichiers, chaque - * résultat de FileAction sont assemblé par un ET logique pour donner - * le résultat final + * résultat de FileAction sont assemblé par un ET logique pour donner + * le résultat final */ public static boolean walkAfter(File f, FileAction fileAction) { boolean result = fileAction.doAction(f); @@ -834,8 +840,8 @@ public class FileUtil { // FileUtil * @param f le fichier ou répertoire à partir duquel il faut commencer * @param fileAction l'action à effectuer sur chaque fichier * @return le résultat des fileAction executé sur les fichiers, chaque - * résultat de FileAction sont assemblé par un ET logique pour donner - * le résultat final + * résultat de FileAction sont assemblé par un ET logique pour donner + * le résultat final */ public static boolean walkBefore(File f, FileAction fileAction) { boolean result = true; @@ -850,7 +856,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * + * <p> * copyRecursively("/truc/titi", "/var/tmp") donnera le repertoire * "/var/tmp/titi" * @@ -868,7 +874,7 @@ public class FileUtil { // FileUtil /** * Copie recursivement le repertoire source dans le repertoire destination - * + * <p> * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -886,18 +892,18 @@ public class FileUtil { // FileUtil String renameTo, String... includePatterns) throws IOException { copyAndRenameRecursively(srcDir, - destDir, - true, - renameFrom, - renameTo, - false, - includePatterns + destDir, + true, + renameFrom, + renameTo, + false, + includePatterns ); } /** * Copie recursivement le repertoire source dans le repertoire destination - * + * <p> * copyRecursively("/truc/titi", "/var/tmp", "bidulle") donnera le repertoire * "/var/tmp/bidulle", 'bidulle' remplacant 'titi' * @@ -999,9 +1005,9 @@ public class FileUtil { // FileUtil /** * Use the linePattern to break the given CharBuffer into lines, applying * the input pattern to each line to see if we have a match - * + * <p> * Code taken from : - * + * <p> * http://java.sun.com/javase/6/docs/technotes/guides/io/example/Grep.java * * @param regex regex to search into file @@ -1046,11 +1052,11 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix grep command. - * + * <p> * Code taken from : - * + * <p> * http://java.sun.com/javase/6/docs/technotes/guides/io/example/Grep.java - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1058,7 +1064,7 @@ public class FileUtil { // FileUtil * @param f file to search into * @param encoding encoding to use * @return matching lines (or {code null} if no matching lines) - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static List<CharSequence> grep(String searchRegex, @@ -1101,7 +1107,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix grep command. - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1110,7 +1116,7 @@ public class FileUtil { // FileUtil * @param fileRegex regex for file to find in {@code rootDirectory} * @param encoding encoding to use * @return all matching lines for each files - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static Map<File, List<CharSequence>> grep(String searchRegex, @@ -1131,7 +1137,7 @@ public class FileUtil { // FileUtil /** * Search for files matching regex in current directory. - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1139,24 +1145,24 @@ public class FileUtil { // FileUtil * @param fileRegex regex for file to find in current dir * @param encoding encoding to use * @return all matching lines for each files - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static Map<File, List<CharSequence>> grep(String searchRegex, String fileRegex, String encoding) throws IOException { Map<File, List<CharSequence>> results = grep(searchRegex, - new File("."), - fileRegex, - encoding); + new File("."), + fileRegex, + encoding); return results; } /** * Sed implementation for a single file. - * + * <p> * Oginal source code from http://kickjava.com/src/org/apache/lenya/util/SED.java.htm. - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1164,7 +1170,7 @@ public class FileUtil { // FileUtil * @param replace Prefix which is going to replace the original * @param file File which sed shall be applied * @param encoding charset encoding - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static void sed(String searchRegex, @@ -1208,7 +1214,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix sed command. - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1217,7 +1223,7 @@ public class FileUtil { // FileUtil * @param rootDirectory directory to search into * @param fileRegex regex for file to find in {@code rootDirectory} * @param encoding encoding to use - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static void sed(String searchRegex, @@ -1233,7 +1239,7 @@ public class FileUtil { // FileUtil /** * Java implementation for the unix sed command. - * + * <p> * May fail on windows with error : * The requested operation cannot be performed on a file with a user-mapped section open * @@ -1241,7 +1247,7 @@ public class FileUtil { // FileUtil * @param replace string to replace matching patterns * @param fileRegex regex for file to find in current dir * @param encoding encoding to use - * @throws IOException + * @throws IOException FIXME * @since 1.1.2 */ public static void sed(String searchRegex, @@ -1256,7 +1262,7 @@ public class FileUtil { // FileUtil * * @param dir the directory to create if not exisiting * @return {@code true} if directory was created, {@code false} if was no - * need to create it + * need to create it * @throws IOException if could not create directory * @since 1.3.2 */ @@ -1271,7 +1277,7 @@ public class FileUtil { // FileUtil /** * Obtain a file from the given {@code rootDirectory}, applying given paths. - * + * <p> * For example with paths = a, b and c, then result is : * <pre> * root/a/b/c @@ -1292,7 +1298,7 @@ public class FileUtil { // FileUtil /** * Obtain a file fro the given {@code rootDirectory}, applying the fqn. - * + * <p> * For example with fqn = a.b.c, the result is : * <pre> * root/a/b/c @@ -1312,9 +1318,8 @@ public class FileUtil { // FileUtil /** * Obtain a directory and creates it if required to place some test data. - * + * <p> * The directory will be : - * * <pre> * java.io.tmpdir/testclassName.fqn/methodName[/classifier]/timestamp * </pre> @@ -1334,14 +1339,14 @@ public class FileUtil { // FileUtil // create the directory to store database data String dataBasePath = testClassName.getName() - + File.separator // a directory with the test class name - + methodName; // a sub-directory with the method name + + File.separator // a directory with the test class name + + methodName; // a sub-directory with the method name if (StringUtils.isNotBlank(classifier)) { dataBasePath += classifier; } dataBasePath += '_' - + timestamp; // and a timestamp + + timestamp; // and a timestamp File databaseFile = new File(tempDirFile, dataBasePath); return databaseFile; } diff --git a/src/main/java/org/nuiton/util/GZUtil.java b/src/main/java/org/nuiton/util/GZUtil.java index a93d4ac..4bc6eec 100644 --- a/src/main/java/org/nuiton/util/GZUtil.java +++ b/src/main/java/org/nuiton/util/GZUtil.java @@ -49,7 +49,7 @@ public class GZUtil { // GZUtil /** * Tests if an inputStream is GZipped. - * + * <p> * <b>Note:</b> the stream is not closed and is reset. * * @param inputStream inputStream to test @@ -70,7 +70,10 @@ public class GZUtil { // GZUtil } - /** Retourne la string decompressee */ + /** + * @param in FIXME + * @return Retourne la string decompressee + */ public static StringBuffer bytesToStringBuffer(byte[] in) { try { if (in == null || in.length == 0) { @@ -90,17 +93,26 @@ public class GZUtil { // GZUtil } } - /** Retourne la string decompressee */ + /** + * @param in FIXME + * @return la string decompressee + */ public static String bytesToString(byte[] in) { return bytesToStringBuffer(in).toString(); } - /** Retourne la string compressee */ + /** + * @param elem FIXME + * @return Retourne la string compressee + */ public static byte[] stringBufferToBytes(StringBuffer elem) { return stringToBytes(elem.toString()); } - /** Retourne la string compressee */ + /** + * @param elem FIXME + * @return Retourne la string compressee + */ public static byte[] stringToBytes(String elem) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); diff --git a/src/main/java/org/nuiton/util/LoggingException.java b/src/main/java/org/nuiton/util/LoggingException.java index 1877c7e..41f4338 100644 --- a/src/main/java/org/nuiton/util/LoggingException.java +++ b/src/main/java/org/nuiton/util/LoggingException.java @@ -36,7 +36,6 @@ package org.nuiton.util; public class LoggingException extends RuntimeException { // LogException - /** */ private static final long serialVersionUID = 3495450140612716283L; public LoggingException(String msg) { diff --git a/src/main/java/org/nuiton/util/LoggingPatternFormatter.java b/src/main/java/org/nuiton/util/LoggingPatternFormatter.java index 2e76cb5..c0b350d 100644 --- a/src/main/java/org/nuiton/util/LoggingPatternFormatter.java +++ b/src/main/java/org/nuiton/util/LoggingPatternFormatter.java @@ -22,13 +22,13 @@ /** * PatternFormatter.java - * + * <p> * Created: Sat Apr 20 2002 * * @author POUSSIN Benjamin <bpoussin@free.fr> * Copyright Code Lutin - * - * + * <p> + * <p> * Mise a jour: $Date$ * par : $Author$ */ @@ -48,13 +48,11 @@ import java.util.logging.LogRecord; /** * Classe org.nuiton.logging.PatternFormatter. - * * <ul> * <li>n: new line</li> * <li>%: %</li> * <li>{: {</li> * </ul> - * * <ul> * <li>d: date</li> * </ul> @@ -72,18 +70,18 @@ import java.util.logging.LogRecord; * <li>a: argument</li> * <li>e: exception</li> * </ul> - * + * <p> * Sized element support justify pattern. - * {[+|-]<size>[:<maxPo>>]}. + * {[+|-]<size>[:<maxPo>]}. * '+' is * left justify, '-' rigth justify, size the prefered size for the element if it is not bigger. * If maxPos option is present blanc is not add if it go up to maxPos. - * + * <p> * SubString * <ul> * <li>M: method name</li> * </ul> - * + * <p> * L'element SubString a les memes possibilites que le pattern justify, * et permet en plus de suprimer une sous chaine, * cela permet de supprimer le debut du nom d'une classe. @@ -121,7 +119,12 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter } } - /** Methode qui formate le record */ + /** + * Methode qui formate le record + * + * @param record FIXME + * @return FIXME + */ public String format(LogRecord record) { StringBuffer result = new StringBuffer(); for (Iterator i = compile.iterator(); i.hasNext(); ) { @@ -146,7 +149,11 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter arguments.put("e", ExceptionArgument.class); } - /** Genere a partir de la chaine la liste des objet Argument. */ + /** + * Genere a partir de la chaine la liste des objet Argument. + * + * @param pattern FIXME + */ protected void compilePattern(String pattern) { compile = new ArrayList<Argument>(); String[] match = findNextPattern(pattern); @@ -161,8 +168,9 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter /** * Recherche dans la chaine le prochaine pattern. * + * @param s FIXME * @return un tableau de 3 chaines, [0] ce qu'il y a avant le - * parttern, [1] le parttern, [2] ce qu'il y a apres le pattern. + * parttern, [1] le parttern, [2] ce qu'il y a apres le pattern. */ protected String[] findNextPattern(String s) { String[] result = new String[]{"", "", ""}; @@ -181,7 +189,7 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter result[2] = s.substring(f + 1); } else { throw new LoggingException("Error, { at position " - + (d + 2) + " not terminated in :" + s); + + (d + 2) + " not terminated in :" + s); } } else { //pas de pattern result[0] = s.substring(0, d); @@ -195,7 +203,12 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter return result; } - /** Converti un pattern en un objet Argument */ + /** + * Converti un pattern en un objet Argument + * + * @param s FIXME + * @return FIXME + */ protected Argument patternToArgument(String s) { if (s.charAt(0) == 'n') { // new ligne return new StringArgument("\n"); @@ -211,18 +224,18 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter Class argumentClass = (Class) arguments.get(code); if (argumentClass == null) throw new LoggingException("Erreur dans le pattern '" + code - + "' inconnu"); + + "' inconnu"); Argument argument; try { argument = (Argument) argumentClass.newInstance(); } catch (InstantiationException eee) { throw new LoggingException( "Erreur lors de l'instanciation de l'objet Argument: " - + argumentClass.getName(), eee); + + argumentClass.getName(), eee); } catch (IllegalAccessException eee) { throw new LoggingException( "Erreur lors de l'instanciation de l'objet Argument: " - + argumentClass.getName(), eee); + + argumentClass.getName(), eee); } if (s.length() > 1) { // on a un pattern argument.setPattern(s.substring(2)); @@ -315,12 +328,12 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter if (left) { toAppendTo.append(s); while (0 < blanc-- - && (maxPos == -1 || toAppendTo.length() < maxPos)) { + && (maxPos == -1 || toAppendTo.length() < maxPos)) { toAppendTo.append(" "); } } else { while (0 < blanc-- - && (maxPos == -1 || toAppendTo.length() < maxPos)) { + && (maxPos == -1 || toAppendTo.length() < maxPos)) { toAppendTo.append(" "); } toAppendTo.append(s); @@ -330,10 +343,14 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter } static abstract protected class SubStringArgument extends SizedArgument { - /** la chaine qui doit etre supprimee */ + /** + * la chaine qui doit etre supprimee + */ protected String removeString = null; - /** vrai si la chaine doit etre retiree du debut, faux pour la fin */ + /** + * vrai si la chaine doit etre retiree du debut, faux pour la fin + */ protected boolean atBeginning = true; public SubStringArgument() { @@ -353,7 +370,7 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter removeString = subpattern[i].substring(1); } else if (subpattern[i].endsWith("*")) { removeString = subpattern[i].substring(0, subpattern[i] - .length() - 1); + .length() - 1); } } } @@ -373,7 +390,7 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter static abstract protected class OctetArgument extends SizedArgument { protected static final String[] UNITE = {"o", "Ko", "Mo", "Go", "To", - "Po"}; + "Po"}; protected int diviseur = 1024; @@ -408,7 +425,7 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter public StringBuffer toString(LogRecord record, StringBuffer toAppendTo) { return justify(toReadableSize(Runtime.getRuntime().freeMemory(), - UNITE, diviseur), toAppendTo); + UNITE, diviseur), toAppendTo); } } @@ -419,7 +436,7 @@ public class LoggingPatternFormatter extends Formatter { // PatternFormatter public StringBuffer toString(LogRecord record, StringBuffer toAppendTo) { return justify(toReadableSize(Runtime.getRuntime().totalMemory(), - UNITE, diviseur), toAppendTo); + UNITE, diviseur), toAppendTo); } } diff --git a/src/main/java/org/nuiton/util/MatrixMap.java b/src/main/java/org/nuiton/util/MatrixMap.java index 7c4af59..2bf7668 100644 --- a/src/main/java/org/nuiton/util/MatrixMap.java +++ b/src/main/java/org/nuiton/util/MatrixMap.java @@ -45,7 +45,7 @@ import java.util.RandomAccess; * Si lors de l'ajout on indique une dimension qui n'existe pas encore ou * un element dans une dimension qui n'existe pas, la matrice ajoute * automatiquement les elements manquant pour que l'ajout se passe bien. - * + * <p> * MatrixMap permet de stocker les elements avec des cles de n'importe quel * type. Les coordonnees utilisant ces objets sont converti en coordonnees * numeriques qui est la seul chose que sait gere Matrix. Ces coordonnees @@ -53,7 +53,7 @@ import java.util.RandomAccess; * dans Vector. On decoupe ainsi les problemes et on minimise le stockage et * certain traitement sur les données puisqu'au final toutes les données sont * dans une simple liste. - * + * <p> * Pour créer une nouvelle matrice, il faut utiliser une des méthodes de * {@link MatrixMap.Factory} * @@ -62,7 +62,9 @@ import java.util.RandomAccess; */ public interface MatrixMap<E> extends Iterable<E> { - /** Classe permettant la creation de matrice */ + /** + * Classe permettant la creation de matrice + */ class Factory { public static <T> MatrixMap<T> create(List... semantics) { MatrixMap<T> result = new MatrixMapFixed<T>(semantics); @@ -148,7 +150,7 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param f la fonction a appliquer * @return Retourne la matrice elle meme. Les modifications sont faites directement - * dessus + * dessus */ MatrixMap<E> map(MapFunction<E> f); @@ -156,8 +158,8 @@ public interface MatrixMap<E> extends Iterable<E> { * Retourne l'element a une certaine position en utilisant des indices * ex: 2,3,1 * - * @param coordinates - * @return + * @param coordinates FIXME + * @return FIXME */ E getValueIndex(int... coordinates); @@ -166,15 +168,15 @@ public interface MatrixMap<E> extends Iterable<E> { * ex: 2,3,1 * * @param value la nouvelle valeur - * @param coordinates + * @param coordinates FIXME */ void setValueIndex(E value, int... coordinates); /** * Retourne l'element a une certaine position en utilisant les semantiques * - * @param coordinates - * @return + * @param coordinates FIXME + * @return FIXME */ E getValue(Object... coordinates); @@ -182,7 +184,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Modifie l'element a une certaine position en utilisant les semantiques * * @param value la nouvelle valeur - * @param coordinates + * @param coordinates FIXME */ void setValue(E value, Object... coordinates); @@ -190,8 +192,8 @@ public interface MatrixMap<E> extends Iterable<E> { * Verifie que deux matrices sont completement equals * (dimension, semantique, nom, valeur, ...) * - * @param mat - * @return + * @param mat FIXME + * @return FIXME */ boolean equals(MatrixMap mat); @@ -199,7 +201,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Verifie si les matrices sont egales en ne regardant que les valeurs et * pas les semantiques * - * @param mat + * @param mat FIXME * @return equality on values */ boolean equalsValues(MatrixMap<E> mat); @@ -207,7 +209,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Representation string de la matrice quelque soit le nombre de dimension * - * @return + * @return FIXME */ String toStringGeneric(); @@ -215,8 +217,8 @@ public interface MatrixMap<E> extends Iterable<E> { * Indique si les semantiques passées en argument sont valable pour la * matrice courante * - * @param semantics - * @return + * @param semantics FIXME + * @return FIXME */ boolean isValidCoordinates(Object[] semantics); @@ -260,7 +262,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de prendre une sous matrice dans la matrice courante. - * + * <p> * Réalise plusieurs appels à {@link #getSubMatrix(int, Object...)} suivant * l'implémentation. * @@ -275,7 +277,7 @@ public interface MatrixMap<E> extends Iterable<E> { * seule dimension à un seul élément. * * @return une nouvelle matrice plus petite que la matrice actuelle ou egal - * s'il n'y a aucune dimension à supprimer + * s'il n'y a aucune dimension à supprimer */ MatrixMap<E> reduce(); @@ -297,7 +299,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param minNbDim le nombre minimum de dimension que l'on souhaite pour la * matrice résultat * @return une nouvelle matrice plus petite que la matrice actuelle ou egal - * s'il n'y a aucune dimension à supprimer + * s'il n'y a aucune dimension à supprimer */ MatrixMap<E> reduce(int minNbDim); @@ -306,8 +308,8 @@ public interface MatrixMap<E> extends Iterable<E> { * en parametre. La nouvelle matrice contient les données de l'ancienne * matrice par copie en fonction des semantiques * - * @param sems - * @return + * @param sems FIXME + * @return FIXME */ MatrixMap<E> extend(Object... sems); @@ -332,7 +334,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param o l'objet a convertir en string * @param length la longueur de representation souhaite * @param valueIfNull la valeur a utilise si l'objet est null - * @return + * @return FIXME */ public static String format(Object o, int length, String valueIfNull) { if (o == null) { @@ -360,8 +362,8 @@ public interface MatrixMap<E> extends Iterable<E> { * @param semantics la semantique à utilisé pour la conversion * @param coordinates les coordonnées à convertir * @return un tableau donnant les coordonnées sous forme semantique s'il n'y - * a pas de semantique (liste pleine de null) alors un objet Integer - * est créer pour représenter la semantique de la dimension. + * a pas de semantique (liste pleine de null) alors un objet Integer + * est créer pour représenter la semantique de la dimension. */ public static Object[] dimensionToSemantics(List[] semantics, int[] coordinates) { @@ -408,7 +410,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (result == -1) { throw new NoSuchElementException( "L'objet passé en argument n'a pas été retrouvé ou la dimension donnée ne convient pas:" - + o + " in " + semantics[dim]); + + o + " in " + semantics[dim]); } return result; } @@ -429,7 +431,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Iterateur de matrice * - * @param <E> + * @param <E> FIXME */ interface MatrixMapIterator<E> extends Iterator<E> { int[] getCoordinates(); @@ -492,7 +494,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (semantics != null) { int[] coordinates = getCoordinates(); result = MatrixHelper.dimensionToSemantics(semantics, - coordinates); + coordinates); } return result; } @@ -501,11 +503,11 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Collection particuliere utilisee pour la stockage des semantiques. - * + * <p> * Sert a optimiser la recherche de la position d'une donnee dans la liste. * Permet aussi de verifier qu'on ajoute pas de doublon dans la liste * - * @param <T> + * @param <T> FIXME */ class SemanticList<T> extends AbstractList<T> implements RandomAccess { @@ -589,20 +591,20 @@ public interface MatrixMap<E> extends Iterable<E> { * dimension qui n'existe pas, elle les ajoutes dans les semantiques. Ceci * n'est vrai que pour le set avec des semantiques, le set avec des indices * ne rend pas la matrice elastique. - * + * <p> * Cette classe fonctionne avec une matrice interne que l'on change lorsque * l'on a besoin de modifier les dimensions. Le changement de dimension * a donc un cout (creation d'une nouvelle matrice, copie des elements) - * + * <p> * Si on cree une sous matrice, et que l'on modifie la matrice mere * La sous matrice n'est pas impacter, puisqu'elle est base sur l'ancienne * represention interne de la matrice elastique, les deux matrices n'ont donc * plus de lien. - * + * <p> * Les methodes reduce et extend retourne de nouvelle matrice qui ne sont * pas elastique. Si on veut qu'elle le soit, il faut les reencapsuler * - * @param <E> + * @param <E> FIXME */ class MatrixMapElastic<E> implements MatrixMap<E> { @@ -771,9 +773,13 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Implantation de MatrixMap dont les dimensions sont fixees a la creation * Les dimensions ne change plus par la suite + * + * @param <E> FIXME */ class MatrixMapFixed<E> extends AbstractMatrixMap<E> { - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(MatrixMapFixed.class); protected Matrix<E> matrix = null; @@ -828,7 +834,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Modifie un element de la matrice en fonction des dimensions passé en * paramètre.<br> - * + * <p> * Exemple: Si on a un matrice 3D.<br> * m.set(v, [1,1,1]) modifie un element de la matrice.<br> * @@ -864,8 +870,8 @@ public interface MatrixMap<E> extends Iterable<E> { origin0 = origin0 && origin[i] == 0; } if (origin0 - && mat instanceof MatrixMapFixed - && Arrays.equals(mat.getDim(), this.getDim())) { + && mat instanceof MatrixMapFixed + && Arrays.equals(mat.getDim(), this.getDim())) { getMatrix().data.paste(((MatrixMapFixed<E>) mat).getMatrix().data); } else { super.paste(origin, mat); @@ -880,11 +886,13 @@ public interface MatrixMap<E> extends Iterable<E> { * Classe abstraite permettant de facilement implanter les matrice fixe, * elastique et submatrix * - * @param <E> + * @param <E> FIXME */ abstract class AbstractMatrixMap<E> implements MatrixMap<E> { - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(AbstractMatrixMap.class); protected String name = null; @@ -967,9 +975,6 @@ public interface MatrixMap<E> extends Iterable<E> { return result; } - /* - * @see java.lang.Object#clone() - */ @Override public MatrixMap clone() { return copy(); @@ -1079,7 +1084,7 @@ public interface MatrixMap<E> extends Iterable<E> { result = ObjectUtils.equals(dimName1, dimName2); if (log.isTraceEnabled()) { log.trace("dimName1(" + dimName1 + ")==dimName2(" + dimName2 - + ")=" + result); + + ")=" + result); } // System.out.println("dimName1("+dimName1+")==dimName2("+dimName2+ // ")="+result); @@ -1104,7 +1109,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Verifie si les matrices sont egales en ne regardant que les valeurs et * pas les semantiques * - * @param mat + * @param mat FIXME * @return equality on values */ public boolean equalsValues(MatrixMap mat) { @@ -1133,7 +1138,7 @@ public interface MatrixMap<E> extends Iterable<E> { * v1, v2, v3 * ] * </pre> - * + * <p> * Si la matrice est 2D * <pre> * MaMatrice(matrix2D) [ @@ -1144,11 +1149,11 @@ public interface MatrixMap<E> extends Iterable<E> { * DimC v7, v8, v9 * ] * </pre> - * + * <p> * Pour les autres types de matrice la methode {@link #toStringGeneric() } * est utilise * - * @return + * @return FIXME */ @Override public String toString() { @@ -1208,7 +1213,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Representation string de la matrice quelque soit le nombre de dimension * - * @return + * @return FIXME */ public String toStringGeneric() { StringBuilder result = new StringBuilder(); @@ -1339,8 +1344,8 @@ public interface MatrixMap<E> extends Iterable<E> { * Add to desambiguas some call with xpath engine, but do the same thing * {@link #getSubMatrix(int, Object[])} * - * @param dim - * @param elem + * @param dim FIXME + * @param elem FIXME * @return new matrix */ public MatrixMap<E> getSubMatrixOnSemantic(int dim, Object... elem) { @@ -1367,7 +1372,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de prendre une sous matrice dans la matrice courante. - * + * <p> * Réalise plusieurs appels à {@link #getSubMatrix(int, Object...)} suivant * l'implémentation. * @@ -1380,7 +1385,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (elems.length != dim.length) { throw new IllegalArgumentException(String.format( "Can't get sub matrix with different dimension count " - + "(expected: %d, got %d)", dim.length, elems.length)); + + "(expected: %d, got %d)", dim.length, elems.length)); } MatrixMap<E> result = this; @@ -1407,7 +1412,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de prendre une sous matrice dans la matrice courante. - * + * <p> * Réalise plusieurs appels a {@link #getSubMatrix(int, int[])} suivant * l'implementation. * @@ -1420,7 +1425,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (elems.length != dim.length) { throw new IllegalArgumentException(String.format( "Can't get sub matrix with different dimension count " - + "(expected: %d, got %d)", dim.length, elems.length)); + + "(expected: %d, got %d)", dim.length, elems.length)); } MatrixMap<E> result = this; @@ -1438,7 +1443,7 @@ public interface MatrixMap<E> extends Iterable<E> { * seule dimension à un seul élément. * * @return une nouvelle matrice plus petite que la matrice actuelle ou egal - * s'il n'y a aucune dimension à supprimer + * s'il n'y a aucune dimension à supprimer */ public MatrixMap<E> reduce() { return reduce(1); @@ -1470,7 +1475,7 @@ public interface MatrixMap<E> extends Iterable<E> { // si la dimension à plus d'un élément ou qu'il n'est pas dans dims // on garde la dimension if (getDim(j) > 1 || Arrays.binarySearch(dims, j) < 0 - || j < minNbDim) { + || j < minNbDim) { // on ne conserve que les dimensions supérieure à 1 correspondance[sem.size()] = j; sem.add(getSemantic(j)); @@ -1490,7 +1495,7 @@ public interface MatrixMap<E> extends Iterable<E> { * @param minNbDim le nombre minimum de dimension que l'on souhaite pour la * matrice résultat * @return une nouvelle matrice plus petite que la matrice actuelle ou egal - * s'il n'y a aucune dimension à supprimer + * s'il n'y a aucune dimension à supprimer */ public MatrixMap<E> reduce(int minNbDim) { // tableau permettant de faire la correspondance entre les dimensions @@ -1597,7 +1602,7 @@ public interface MatrixMap<E> extends Iterable<E> { * Pour l'instant une sous matrice a obligatoirement le meme nombre de dimension * que la matrice qu'elle contient. Elle permet juste de reduire le nombre * d'element d'une dimension. - * + * <p> * C'est comme une "vue" réduite sur la vraie matrices. */ class SubMatrix<E> extends AbstractMatrixMap<E> { // SubMatrix @@ -1715,10 +1720,14 @@ public interface MatrixMap<E> extends Iterable<E> { int[] convertCoordinates(int[] coordinates); } - /** La conversion est juste un decalage d'indice */ + /** + * La conversion est juste un decalage d'indice + */ protected static class ShiftConverter implements DimensionConverter { - /** serialVersionUID. */ + /** + * serialVersionUID. + */ private static final long serialVersionUID = 1L; protected int dim; @@ -1748,10 +1757,14 @@ public interface MatrixMap<E> extends Iterable<E> { } } - /** La conversion est le mapping d'un element vers un autre element. */ + /** + * La conversion est le mapping d'un element vers un autre element. + */ protected static class MappingConverter implements DimensionConverter { - /** serialVersionUID. */ + /** + * serialVersionUID. + */ private static final long serialVersionUID = -6367416559713556559L; protected int dim; @@ -1784,13 +1797,19 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Objet matrice qui ne permet que le stockage avec des positions int * dans une matrice a autant de dimension que l'on souhaite. + * + * @param <E> FIXME */ class Matrix<E> implements Iterable<E> { // BasicMatrix - /** Les dimensions de la matrice */ + /** + * Les dimensions de la matrice + */ protected int[] dimensions = null; - /** La matrice en représentation linéaire */ + /** + * La matrice en représentation linéaire + */ protected Vector<E> data = null; /** @@ -1881,6 +1900,7 @@ public interface MatrixMap<E> extends Iterable<E> { * * @return un objet Inc pret à être utilisé */ + @Override public MatrixIterator<E> iterator() { return new MatrixIterator<E>(this); } @@ -1973,7 +1993,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (!result) { throw new NoSuchElementException(String.format( "Invalid element asked %s for real dimension %s", Arrays.toString(pos), Arrays - .toString(dim))); + .toString(dim))); } } @@ -2021,7 +2041,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (o instanceof Matrix) { Matrix other = (Matrix) o; return this == o - || (Arrays.equals(this.dimensions, other.dimensions) && this.data + || (Arrays.equals(this.dimensions, other.dimensions) && this.data .equals(other.data)); } return false; @@ -2035,7 +2055,9 @@ public interface MatrixMap<E> extends Iterable<E> { protected int pos = -1; - /** @param matrix la matrice sur lequel l'iterator doit travailler */ + /** + * @param matrix la matrice sur lequel l'iterator doit travailler + */ public MatrixIterator(Matrix<E> matrix) { this.matrix = matrix; pos = -1; @@ -2081,21 +2103,31 @@ public interface MatrixMap<E> extends Iterable<E> { * Cette classe ne gére que les données lineaire. L'avantage de cette classe est * de ne conserver que les elements differents de la valeur par defaut, ce qui * minimize la taille du tableau necessaire a conserver les données. + * + * @param <E> FIXME */ class Vector<E> { // Vector - /** maximum number of element, maximum pos value */ + /** + * maximum number of element, maximum pos value + */ protected int capacity = 0; - /** la valeur par defaut */ + /** + * la valeur par defaut + */ protected E defaultValue = null; - /** contient la position de l'element, le tableau est trie */ + /** + * contient la position de l'element, le tableau est trie + */ protected int[] position; protected int positionSize = 0; - /** contient la valeur de l'element */ + /** + * contient la valeur de l'element + */ protected ArrayList<E> data = new ArrayList<E>(); public Vector(int capacity) { @@ -2170,7 +2202,7 @@ public interface MatrixMap<E> extends Iterable<E> { protected void checkPos(int pos) { if (pos < 0 || pos >= capacity) { throw new IllegalArgumentException("pos " + pos + " is not in [0, " - + capacity + "]"); + + capacity + "]"); } } @@ -2215,7 +2247,7 @@ public interface MatrixMap<E> extends Iterable<E> { if (o instanceof Vector) { Vector other = (Vector) o; result = Arrays.equals(this.position, other.position) - && data.equals(other.data); + && data.equals(other.data); } return result; } @@ -2223,9 +2255,9 @@ public interface MatrixMap<E> extends Iterable<E> { /** * retourne la position dans le tableau position de la position lineaire * - * @param pos + * @param pos FIXME * @return la position ou < 0 donnant la position de l'element s'il etait - * present + * present */ protected int findIndex(int pos) { return Arrays.binarySearch(position, pos); @@ -2265,6 +2297,7 @@ public interface MatrixMap<E> extends Iterable<E> { /** * On recopie tous les attributs pour que le vector ressemble exactement a * celui passé en argument + * @param v FIXME */ public void paste(Vector<E> v) { this.capacity = v.capacity; @@ -2272,12 +2305,15 @@ public interface MatrixMap<E> extends Iterable<E> { this.positionSize = v.positionSize; this.position = new int[v.position.length]; System.arraycopy(v.position, 0, this.position, 0, - this.position.length); + this.position.length); this.data.clear(); this.data.addAll(v.data); } - /** on applique sur chaque donnée existante et sur default */ + /** + * on applique sur chaque donnée existante et sur default + * @param f FIXME + */ public void map(MapFunction<E> f) { // on commence toujours par modifier la valeur par defaut // car les valeurs suivante pourrait prendre cette valeur @@ -2301,6 +2337,8 @@ public interface MatrixMap<E> extends Iterable<E> { /** * Permet de faire un traitement sur des valeurs et d'en retourner * des nouvelles. + * + * @param <E> FIXME */ interface MapFunction<E> { // MapFunction @@ -2310,7 +2348,7 @@ public interface MatrixMap<E> extends Iterable<E> { * * @param value la valeur courante sur lequel il faut faire le traitement * @return la nouvelle valeur à mettre dans la matrice à la place de - * l'ancienne. + * l'ancienne. */ E apply(E value); diff --git a/src/main/java/org/nuiton/util/ObjectUtil.java b/src/main/java/org/nuiton/util/ObjectUtil.java index 47ff77d..f7fc15b 100644 --- a/src/main/java/org/nuiton/util/ObjectUtil.java +++ b/src/main/java/org/nuiton/util/ObjectUtil.java @@ -97,6 +97,7 @@ public class ObjectUtil { // ObjectUtil * Invoke constructor on clazz to create new instance. Try to find argument * for constructor in args parameter. * + * @param <E> FIXME * @param clazz class of object to instanciate * @param args all possible parameter that constructor can used * @param nullIfMissing if no suitable class or object found in args, @@ -197,13 +198,13 @@ public class ObjectUtil { // ObjectUtil * <li> name="my string with , in string"</li> * <li> name='my string with , in string'</li> * </ul> - * @param classnameAndProperties - * @return the instanciated object - * @throws ClassNotFoundException - * @throws IllegalAccessException - * @throws InstantiationException - * @throws NoSuchMethodException - * @throws InvocationTargetException + * @param classnameAndProperties FIXME + * @return the instanciated object FIXME + * @throws ClassNotFoundException FIXME + * @throws IllegalAccessException FIXME + * @throws InstantiationException FIXME + * @throws NoSuchMethodException FIXME + * @throws InvocationTargetException FIXME */ public static Object create(String classnameAndProperties) throws ClassNotFoundException, @@ -267,6 +268,7 @@ public class ObjectUtil { // ObjectUtil * } * </pre> * + * @param <E> FIXME * @param e object to clone * @return new instance of E * @throws CloneNotSupportedException if some error occur during clone @@ -286,6 +288,7 @@ public class ObjectUtil { // ObjectUtil /** * Use serialization/deserialization to do deep clone of object * + * @param <E> FIXME * @param e object to clone * @return new instance of E * @throws CloneNotSupportedException if some error occur during clone @@ -326,10 +329,10 @@ public class ObjectUtil { // ObjectUtil * @param m method to call * @param params parameters for method call * @return returned method's value - * @throws IllegalAccessException - * @throws IllegalArgumentException - * @throws InvocationTargetException - * @throws InstantiationException + * @throws IllegalAccessException FIXME + * @throws IllegalArgumentException FIXME + * @throws InvocationTargetException FIXME + * @throws InstantiationException FIXME */ public static Object call(Object o, Method m, String... params) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException { @@ -460,7 +463,7 @@ public class ObjectUtil { // ObjectUtil * @param clazz class to instanciate * @param params parameters for constructor call * @return new instance of clazz - * @throws IllegalArgumentException + * @throws IllegalArgumentException FIXME */ public static <T> T newInstance(Class<T> clazz, String... params) throws IllegalArgumentException { diff --git a/src/main/java/org/nuiton/util/ResourceException.java b/src/main/java/org/nuiton/util/ResourceException.java index e6b3702..de00c00 100644 --- a/src/main/java/org/nuiton/util/ResourceException.java +++ b/src/main/java/org/nuiton/util/ResourceException.java @@ -35,7 +35,6 @@ package org.nuiton.util; public class ResourceException extends RuntimeException { // ResourceException - /** */ private static final long serialVersionUID = -5490688835958083084L; public ResourceException(String msg) { diff --git a/src/main/java/org/nuiton/util/ResourceNotFoundException.java b/src/main/java/org/nuiton/util/ResourceNotFoundException.java index d68fe4c..fc6487e 100644 --- a/src/main/java/org/nuiton/util/ResourceNotFoundException.java +++ b/src/main/java/org/nuiton/util/ResourceNotFoundException.java @@ -36,7 +36,6 @@ package org.nuiton.util; public class ResourceNotFoundException extends ResourceException { // ResourceNotFoundException - /** */ private static final long serialVersionUID = 623160949107461992L; public ResourceNotFoundException(String msg) { diff --git a/src/main/java/org/nuiton/util/SemVer.java b/src/main/java/org/nuiton/util/SemVer.java index 5c8bdc1..6cf5ea2 100644 --- a/src/main/java/org/nuiton/util/SemVer.java +++ b/src/main/java/org/nuiton/util/SemVer.java @@ -33,26 +33,25 @@ import java.util.regex.Pattern; /** * Implantation de http://semver.org/. - * + * <p> * Cette objet est immutable, Il faut utiliser {@link #getCreator()} * pour modifier un de ses elements - * + * <p> * Quelques changement par rapport au site: * <ul> * <li> le numero de version peut avoir entre 1 et N element, et non pas 3 obligatoirement * <li> on peut avoir un -SNAPSHOT ajoute en toute fin de la version * </ul> - * + * <p> * Un SemVer est en plusieurs elements dont chaque element peut avoir plusieurs * composant. Les composants sont utilise le meme separateur '.'. - * * <ul> - * <li> version: 1 à N composant numerique, les 3 premiers sont nomme - * <ul> - * <li> major - * <li> minor - * <li> patch - * </ul> + * <li> version: 1 à N composant numerique, les 3 premiers sont nomme + * <ul> + * <li> major + * <li> minor + * <li> patch + * </ul> * <li> prerelease: 0 à N composant alphanumerique, le prefix est '-' * <li> build: 0 à N composant alphanumerique, le prefix est '+' * <li> SNAPSHOT: 0 ou 1 composant dont le nom est fixe le prefix est '-' @@ -68,46 +67,63 @@ import java.util.regex.Pattern; * </ul> * * @author Benjamin Poussin - poussin@codelutin.com - * - * * @since 2.6.7 * @deprecated since 3.0 (use now {@link org.nuiton.util.version.SemVer}). */ @Deprecated public class SemVer implements Comparable<SemVer> { - /** Logger. */ + /** + * Logger. + */ static private Log log = LogFactory.getLog(SemVer.class); - /** Separateur utiliser entre chaque element d'une partie */ + /** + * Separateur utiliser entre chaque element d'une partie + */ final static public String SERIES_SEPARATOR = "."; // le separateur - /** Seperateur entre la version et l'element prerelease */ + /** + * Seperateur entre la version et l'element prerelease + */ final static public String PRERELEASE_SEPARATOR = "-"; // le separateur de Prerelease - /** Separateur utiliser devant l'element build */ + /** + * Separateur utiliser devant l'element build + */ final static public String BUILD_SEPARATOR = "+"; // le separateur de build - /** pattern pour une partie de l'element version */ + /** + * pattern pour une partie de l'element version + */ final static public String PATTERN_VERSION = "[0-9]+"; // le version ne sont que des nombres - /** pattern pour une partie de l'element prerelease */ + /** + * pattern pour une partie de l'element prerelease + */ final static public String PATTERN_PRERELEASE = "[0-9A-Za-z-]+"; // les Prerelease sont des chiffre, lettre ou '-' - /** pattern pour une partir de l'element build */ + /** + * pattern pour une partir de l'element build + */ final static public String PATTERN_BUILD = "[0-9A-Za-z-]+";// les Build sont des chiffre, lettre ou '-' - /** Separateur de SNAPSHOT */ + /** + * Separateur de SNAPSHOT + */ final static public String SNAPSHOT_SEPARATOR = "-"; - /** la chaine de caractere representant le SNAPSHOT */ + /** + * la chaine de caractere representant le SNAPSHOT + */ final static public String SNAPSHOT = "SNAPSHOT"; // "(1.20.300)(-alpha-1.20)?(+r123.20130126)?" // version prerelease build - /** pattern qui permet de separer les 3 constituante d'une version, ne + /** + * pattern qui permet de separer les 3 constituante d'une version, ne * supporte pas le SNAPSHOT, il faut donc que le SNAPSHOT ait ete retirer * avant d'appliquer le pattern */ final static Pattern PATTERN_ALL = Pattern.compile( - "("+PATTERN_VERSION+"(?:"+Pattern.quote(SERIES_SEPARATOR)+PATTERN_VERSION+")*)" + - "("+Pattern.quote(PRERELEASE_SEPARATOR)+ PATTERN_PRERELEASE+"(?:"+Pattern.quote(SERIES_SEPARATOR)+PATTERN_PRERELEASE+")*)?" + - "("+Pattern.quote(BUILD_SEPARATOR)+ PATTERN_BUILD+"(?:"+Pattern.quote(SERIES_SEPARATOR)+PATTERN_BUILD+")*)?"); + "(" + PATTERN_VERSION + "(?:" + Pattern.quote(SERIES_SEPARATOR) + PATTERN_VERSION + ")*)" + + "(" + Pattern.quote(PRERELEASE_SEPARATOR) + PATTERN_PRERELEASE + "(?:" + Pattern.quote(SERIES_SEPARATOR) + PATTERN_PRERELEASE + ")*)?" + + "(" + Pattern.quote(BUILD_SEPARATOR) + PATTERN_BUILD + "(?:" + Pattern.quote(SERIES_SEPARATOR) + PATTERN_BUILD + ")*)?"); protected String version; protected String prerelease; @@ -116,8 +132,9 @@ public class SemVer implements Comparable<SemVer> { /** * Create new Version object, strip is done on argument to remove extra space - * @param versionString - * @exception IllegalArgumentException if argument isn't valid version string + * + * @param versionString FIXME + * @throws IllegalArgumentException if argument isn't valid version string */ public SemVer(String versionString) { String v = StringUtils.strip(versionString); // on conserve versionString intact pour le message d'erreur @@ -171,10 +188,11 @@ public class SemVer implements Comparable<SemVer> { /** * Compare deux elements de meme semantique (version, prerelease, build, snapshot) * sinon le comportement est non predictible - * @param a - * @param b + * + * @param a FIXME + * @param b FIXME * @param nullIsHigh indique si un des elements est null, s'il est plus - * grand ou plus petit que l'autre + * grand ou plus petit que l'autre * @return negatif si a inferieur b, 0 si a == b, positif si a superieur a b */ protected int compare(String a, String b, boolean nullIsHigh) { @@ -191,7 +209,7 @@ public class SemVer implements Comparable<SemVer> { String[] bSeries = StringUtils.split(b, SERIES_SEPARATOR); int length = Math.max(aSeries.length, bSeries.length); - for (int i=0; result==0 & i<length; i++) { + for (int i = 0; result == 0 & i < length; i++) { // s'il y en a un qui est plus court, on prend par defaut "" String va = i < aSeries.length ? aSeries[i] : ""; String vb = i < bSeries.length ? bSeries[i] : ""; @@ -217,12 +235,12 @@ public class SemVer implements Comparable<SemVer> { /** * Ne compare par le chaine, seulement la nullite, si un des arguments * est null, alors il est plus grand que l'autre. - * + * <p> * 1.0 est plus grand que 1.0-Beta * - * @param a - * @param b - * @return + * @param a FIXME + * @param b FIXME + * @return FIXME */ protected int nullIsHigh(String a, String b) { int result = 0; @@ -239,12 +257,12 @@ public class SemVer implements Comparable<SemVer> { /** * Ne compare par le chaine, seulement la nullite, si un des arguments * est null, alors il est plus petit que l'autre. - * + * <p> * 1.0+r123 est plus grand que 1.0 * - * @param a - * @param b - * @return + * @param a FIXME + * @param b FIXME + * @return FIXME */ protected int nullIsLow(String a, String b) { int result = 0; @@ -265,7 +283,8 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2 * </ul> * - * @return + * @param element FIXME + * @return FIXME */ protected int getComposantCount(String element) { int result = 0; @@ -277,8 +296,10 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * + * @param element FIXME + * @param i FIXME + * @return FIXME */ protected String getComposant(String element, int i) { String[] v = StringUtils.split(element, SERIES_SEPARATOR); @@ -290,7 +311,6 @@ public class SemVer implements Comparable<SemVer> { } - public String getVersion() { return version; } @@ -302,7 +322,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2 * </ul> * - * @return + * @return FIXME */ public int getVersionCount() { int result = getComposantCount(getVersion()); @@ -311,8 +331,9 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * + * @param i FIXME + * @return FIXME */ public String getVersion(int i) { String s = getComposant(getVersion(), i); @@ -345,7 +366,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2 * </ul> * - * @return + * @return FIXME */ public int getPrereleaseCount() { int result = getComposantCount(getPrerelease()); @@ -354,8 +375,9 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * + * @param i FIXME + * @return FIXME */ public String getPrerelease(int i) { String s = getComposant(getPrerelease(), i); @@ -373,7 +395,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2 * </ul> * - * @return + * @return FIXME */ public int getBuildCount() { int result = getComposantCount(getBuild()); @@ -382,8 +404,9 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * + * @param i FIXME + * @return FIXME */ public String getBuild(int i) { String s = getComposant(getBuild(), i); @@ -408,7 +431,7 @@ public class SemVer implements Comparable<SemVer> { @Override public boolean equals(Object o) { - boolean result = o instanceof SemVer && this.compareTo((SemVer)o) == 0; + boolean result = o instanceof SemVer && this.compareTo((SemVer) o) == 0; return result; } @@ -443,7 +466,8 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un objet creator initialise avec les donnees de ce SemVer * ce qui permet de creer un nouveau SemVer en modifiant un des elements - * @return + * + * @return FIXME */ public SemVerCreator getCreator() { return creator(this); @@ -451,8 +475,9 @@ public class SemVer implements Comparable<SemVer> { /** * Indique si la chaine represente bien une version au format SemVer - * @param version - * @return + * + * @param version FIXME + * @return FIXME */ static public boolean isSemVer(String version) { if (StringUtils.endsWithIgnoreCase(version, SNAPSHOT)) { @@ -470,9 +495,11 @@ public class SemVer implements Comparable<SemVer> { * SemVer v = SemVer.creator().setVersion("1.2").setPrerelease("beta.1").setBuild("r123").done(); * SemVer v = SemVer.creator("1.2", "beta.1","r123", SemVer.SNAPSHOT).done(); * </pre> - * @return + * + * @param v FIXME + * @return FIXME */ - static public SemVerCreator creator(String ... v) { + static public SemVerCreator creator(String... v) { SemVerCreator result = new SemVerCreator(); if (v != null) { if (v.length > 0) { @@ -507,10 +534,11 @@ public class SemVer implements Comparable<SemVer> { /** * Createur qui permet de passer en parametre les different composante de * l'element version - * @param v - * @return + * + * @param v FIXME + * @return FIXME */ - static public SemVerCreator creator(int ... v) { + static public SemVerCreator creator(int... v) { SemVerCreator result = creator(StringUtils.join(v, SERIES_SEPARATOR)); return result; } @@ -518,11 +546,11 @@ public class SemVer implements Comparable<SemVer> { /** * Create creator initialized with SemVer value, you can change some Element * by puting null value. - * + * <p> * SemVer n = SemVer.creator(v).setBuild("r123").setSnapshot(false).done(); * - * @param v - * @return + * @param v FIXME + * @return FIXME */ static public SemVerCreator creator(SemVer v) { SemVerCreator result = creator( @@ -535,7 +563,7 @@ public class SemVer implements Comparable<SemVer> { * aussi de desambiguise les deux autres methode creator qui si elle * n'ont pas de parametre sont semblable * - * @return + * @return FIXME */ static public SemVerCreator creator() { SemVerCreator result = new SemVerCreator(); @@ -587,7 +615,7 @@ public class SemVer implements Comparable<SemVer> { * doit representer un entier sinon une exception est leve * * @param indice la composante de la version a incrementer - * @param inc le nombre a lui ajouter + * @param inc le nombre a lui ajouter * @return new instance, this SemVer is not modified */ public SemVerCreator incVersion(int indice, int inc) { @@ -609,6 +637,7 @@ public class SemVer implements Comparable<SemVer> { /** * Return new instance, this SemVer is not modified + * * @return new instance where major version number is incremented by 1 */ public SemVerCreator incMajor() { @@ -617,6 +646,7 @@ public class SemVer implements Comparable<SemVer> { /** * Return new instance, this SemVer is not modified + * * @return new instance where major version number is incremented by 1 */ public SemVerCreator incMinor() { @@ -625,6 +655,7 @@ public class SemVer implements Comparable<SemVer> { /** * Return new instance, this SemVer is not modified + * * @return new instance where major version number is incremented by 1 */ public SemVerCreator incPatch() { @@ -634,10 +665,10 @@ public class SemVer implements Comparable<SemVer> { public SemVer done() { SemVer result = new SemVer( StringUtils.defaultString(version) + - ifNotNull(PRERELEASE_SEPARATOR, prerelease) + - ifNotNull(BUILD_SEPARATOR, build) + - ifNotNull(SNAPSHOT_SEPARATOR, snapshot) - ); + ifNotNull(PRERELEASE_SEPARATOR, prerelease) + + ifNotNull(BUILD_SEPARATOR, build) + + ifNotNull(SNAPSHOT_SEPARATOR, snapshot) + ); return result; } } diff --git a/src/main/java/org/nuiton/util/StringUtil.java b/src/main/java/org/nuiton/util/StringUtil.java index 458eebc..336db40 100644 --- a/src/main/java/org/nuiton/util/StringUtil.java +++ b/src/main/java/org/nuiton/util/StringUtil.java @@ -498,7 +498,7 @@ public class StringUtil { // StringUtil * "yellow" ou bien en RGB "#FFAA99", et avec un canal alpha * "#FFAA3366" * @return la couleur demandé si possible sinon null - * @throws IllegalArgumentException + * @throws IllegalArgumentException FIXME * @throws StringUtilException if any problem while conversion */ public static Color toColor(String s) throws StringUtilException { diff --git a/src/main/java/org/nuiton/util/StringUtilException.java b/src/main/java/org/nuiton/util/StringUtilException.java index 873ec57..c9e30cd 100644 --- a/src/main/java/org/nuiton/util/StringUtilException.java +++ b/src/main/java/org/nuiton/util/StringUtilException.java @@ -25,7 +25,6 @@ package org.nuiton.util; /** @author pineau */ public class StringUtilException extends RuntimeException { - /** */ private static final long serialVersionUID = 6148795384335489591L; public StringUtilException(String message, Exception e) { diff --git a/src/main/java/org/nuiton/util/ZipUtil.java b/src/main/java/org/nuiton/util/ZipUtil.java index e081563..727d0f8 100644 --- a/src/main/java/org/nuiton/util/ZipUtil.java +++ b/src/main/java/org/nuiton/util/ZipUtil.java @@ -518,7 +518,7 @@ public class ZipUtil { * @param file archive file * @param targetDir destination file * @param excludes excludes pattern (pattern must match complete entry name including root folder) - * @throws IOException + * @throws IOException FIXME */ public static void uncompressFiltred(File file, File targetDir, diff --git a/src/main/java/org/nuiton/util/beans/BeanUtil.java b/src/main/java/org/nuiton/util/beans/BeanUtil.java index 10fc39f..01c9949 100644 --- a/src/main/java/org/nuiton/util/beans/BeanUtil.java +++ b/src/main/java/org/nuiton/util/beans/BeanUtil.java @@ -210,6 +210,7 @@ public class BeanUtil { * Obtains all readable properties from a given type. * * @param beanType the type to seek + * @param propertyName FIXME * @return the set of all readable properties for the given type * @since 2.0 */ diff --git a/src/main/java/org/nuiton/util/beans/Binder.java b/src/main/java/org/nuiton/util/beans/Binder.java index 23a979e..b94131a 100644 --- a/src/main/java/org/nuiton/util/beans/Binder.java +++ b/src/main/java/org/nuiton/util/beans/Binder.java @@ -114,7 +114,7 @@ public class Binder<I, O> implements Serializable { * To bind the collection. * * <strong>Warning:</strong> Do not use it in the method {@link BinderModelBuilder#addCollectionStrategy(CollectionStrategy, String...)} - * since it is only use in internaly by the method {@link BinderModelBuilder#addCollectionBinder(Binder, String...)}. + * since it is only use in internaly by the method {@link BinderModelBuilder#addCollectionBinder(Binder, String...)} * * Note: at this level, we will just create the collection. */ diff --git a/src/main/java/org/nuiton/util/beans/BinderFactory.java b/src/main/java/org/nuiton/util/beans/BinderFactory.java index e2704ce..42f6144 100644 --- a/src/main/java/org/nuiton/util/beans/BinderFactory.java +++ b/src/main/java/org/nuiton/util/beans/BinderFactory.java @@ -134,6 +134,7 @@ public class BinderFactory { * @param binderType type of binder required * @param <S> the type of source * @param <T> the type of target + * @param <B> the type of binder * @return the new instanciated binder. */ public static <S, T, B extends Binder<S, T>> B newBinder(Class<S> sourceType, @@ -306,6 +307,7 @@ public class BinderFactory { * @param binderType type of binder required * @param <S> the type of source * @param <T> the type of target + * @param <B> the type of binder * @return the new instanciated binder. */ protected static <S, T, B extends Binder<S, T>> Binder<S, T> newBinder0(Class<S> sourceType, diff --git a/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java b/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java index dcb9d39..e0b068a 100644 --- a/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java +++ b/src/main/java/org/nuiton/util/beans/BinderModelBuilder.java @@ -38,16 +38,15 @@ import java.util.TreeMap; /** * Class to create a new {@link Binder.BinderModel}. - * - * + * <p> * A such object is designed to build only one model of binder and can not be * used directly to create a new binder, it prepares only the model of a new * binder, which after must be registred in the {@link BinderFactory} to obtain * a real {@link Binder}. - * + * <p> * If you want to create more than one binder model, use each time a new * binder builder. - * + * <p> * To obtain a new instance of a build please use one of the factories method : * <ul> * <li>{@link #newEmptyBuilder(Class)}} to create a binder model with same @@ -84,7 +83,6 @@ import java.util.TreeMap; * <pre> * builder.addSimpleProperties(...).addProperty(...).addBinder(...) * </pre> - * * Here is an example of how to use the {@link BinderModelBuilder} : * <pre> * BinderModelBuilder<Bean, Bean> builder = new BinderModelBuilder(Bean.class); @@ -92,13 +90,14 @@ import java.util.TreeMap; * BinderFactory.registerBinderModel(builder); * Binder<Bean, Bean> binder = BinderFactory.getBinder(BeanA.class); * </pre> - * * Once the binder is registred into the {@link BinderFactory}, you can get it * each time you need it : * <pre> * Binder<Bean, Bean> binder = BinderFactory.getBinder(Bean.class); * </pre> * + * @param <S> FIXME + * @param <T> FIXME * @author Tony Chemit - chemit@codelutin.com * @see Binder.BinderModel * @see Binder @@ -111,18 +110,25 @@ public class BinderModelBuilder<S, T> { */ protected boolean canTypeMismatch; - /** current model used to build the binder */ + /** + * current model used to build the binder + */ protected Binder.BinderModel<S, T> model; - /** source properties descriptors */ + /** + * source properties descriptors + */ protected Map<String, PropertyDescriptor> sourceDescriptors; - /** target properties descriptors */ + /** + * target properties descriptors + */ protected Map<String, PropertyDescriptor> targetDescriptors; /** * Creates a new mirrored and empty model binder for the given {@code type}. * + * @param <S> FIXME * @param type the type of mirrored binder * @return the new instanciated builder */ @@ -133,6 +139,8 @@ public class BinderModelBuilder<S, T> { /** * Creates a new empty model binder for the given types. * + * @param <S> FIXME + * @param <T> FIXME * @param sourceType type of the source of the binder * @param targetType type of the target of the binder * @return the new instanciated builder @@ -146,6 +154,7 @@ public class BinderModelBuilder<S, T> { * Creates a new mirrored model builder and fill the model with all matching * and available property from the given type. * + * @param <S> FIXME * @param sourceType the mirrored type of the binder model to create * @param <S> the mirrored type of the binder model to create * @return the new instanciated model builder fully filled @@ -244,7 +253,7 @@ public class BinderModelBuilder<S, T> { return this; } - public <K,V> BinderModelBuilder<S, T> addFunction(Class<K> type, Function<K,V> function) { + public <K, V> BinderModelBuilder<S, T> addFunction(Class<K> type, Function<K, V> function) { model.functions.put(type, function); return this; } @@ -252,7 +261,7 @@ public class BinderModelBuilder<S, T> { /** * Convinient method to create directly a {@link Binder} using the * underlying {@link #model} the builder contains. - * + * <p> * <strong>Note:</strong> Using this method will not make reusable the model * via the {@link BinderFactory}. * @@ -268,7 +277,7 @@ public class BinderModelBuilder<S, T> { /** * Convinient method to create directly a {@link Binder} using the * underlying {@link #model} the builder contains. - * + * <p> * <strong>Note:</strong> Using this method will not make reusable the model * via the {@link BinderFactory}. * @@ -285,15 +294,15 @@ public class BinderModelBuilder<S, T> { /** * set factory of target instance + * @param instanceFactory FIXME */ public void setInstanceFactory(InstanceFactory<T> instanceFactory) { model.setInstanceFactory(instanceFactory); } /** - * Add to the binder model some simple properties (says source property name - * = target property name). - * + * Add to the binder model some simple properties (says source property name = target property name). + * <p> * <b>Note:</b> If no model is present, the method will fail. * * @param properties the name of mirrored property @@ -314,9 +323,8 @@ public class BinderModelBuilder<S, T> { } /** - * Add to the binder model some simple properties (says source property name - * = target property name). - * + * Add to the binder model some simple properties (says source property name = target property name). + * <p> * <b>Note:</b> If no model is present, the method will fail. * * @param sourceProperty the name of the source property to bind @@ -343,15 +351,15 @@ public class BinderModelBuilder<S, T> { /** * Add to the binder model some properties. - * + * <p> * Parameter {@code sourceAndTargetProperties} must be a array of couple * of {@code sourceProperty}, {@code targetProperty}. - * + * <p> * Example : * <pre> * builder.addProperties("name","name2","text","text"); * </pre> - * + * <p> * <b>Note:</b> If no model is present, the method will fail. * * @param sourceAndTargetProperties the couple of (sourceProperty - @@ -368,7 +376,7 @@ public class BinderModelBuilder<S, T> { if (sourceAndTargetProperties.length % 2 != 0) { throw new IllegalArgumentException( "must have couple(s) of sourceProperty,targetProperty) " + - "but had " + Arrays.toString(sourceAndTargetProperties)); + "but had " + Arrays.toString(sourceAndTargetProperties)); } for (int i = 0, max = sourceAndTargetProperties.length / 2; i < max; i++) { @@ -377,12 +385,12 @@ public class BinderModelBuilder<S, T> { if (sourceProperty == null) { throw new NullPointerException( "parameter 'sourceAndTargetProperties' can not " + - "contains a null value"); + "contains a null value"); } if (targetProperty == null) { throw new NullPointerException( "parameter 'sourceAndTargetProperties' can not " + - "contains a null value"); + "contains a null value"); } addProperty0(sourceProperty, targetProperty); } @@ -400,7 +408,7 @@ public class BinderModelBuilder<S, T> { if (!model.containsSourceProperty(propertyName)) { throw new IllegalArgumentException( "source property '" + propertyName + "' " + - " is NOT registred."); + " is NOT registred."); } // check property is the same type of given binder @@ -408,11 +416,11 @@ public class BinderModelBuilder<S, T> { Class<?> type = descriptor.getPropertyType(); if (!Collection.class.isAssignableFrom(type) && - !binder.model.getSourceType().isAssignableFrom(type)) { + !binder.model.getSourceType().isAssignableFrom(type)) { throw new IllegalStateException( "source property '" + propertyName + - "' has not the same type [" + type + - "] of the binder [" + binder.model.getSourceType() + "]."); + "' has not the same type [" + type + + "] of the binder [" + binder.model.getSourceType() + "]."); } // can safely add the strategy @@ -455,9 +463,9 @@ public class BinderModelBuilder<S, T> { /** * Creates a new model builder inversing the the source and target of this builder. - * + * <p> * the result build will contains the inversed properties mapping of the original builder. - * + * <p> * Other builder attributes are not used used * * @return the new model builder @@ -475,7 +483,7 @@ public class BinderModelBuilder<S, T> { return builder; } - + protected BinderModelBuilder<S, T> addCollectionStrategy0(String propertyName, Binder.CollectionStrategy strategy, Binder binder) { @@ -484,7 +492,7 @@ public class BinderModelBuilder<S, T> { if (!model.containsSourceProperty(propertyName)) { throw new IllegalArgumentException( "source property '" + propertyName + "' " + - " is NOT registred."); + " is NOT registred."); } // check property is collection type @@ -493,13 +501,13 @@ public class BinderModelBuilder<S, T> { if (!Collection.class.isAssignableFrom(type)) { throw new IllegalStateException( "source property '" + propertyName + - "' is not a collection type [" + type + "]"); + "' is not a collection type [" + type + "]"); } // can safely add the strategy model.addCollectionStrategy(propertyName, strategy); - if (binder!=null) { + if (binder != null) { // add also the binder model.addBinder(propertyName, binder); @@ -525,7 +533,7 @@ public class BinderModelBuilder<S, T> { if (model != null) { throw new IllegalStateException( "there is already a binderModel in construction, release " + - "it with the method createBinder before using this method." + "it with the method createBinder before using this method." ); } @@ -550,14 +558,14 @@ public class BinderModelBuilder<S, T> { sourceDescriptors.get(sourceProperty); if (sourceDescriptor == null) { throw new IllegalArgumentException("no property '" + - sourceProperty + "' " + "found on type " + - model.getSourceType()); + sourceProperty + "' " + "found on type " + + model.getSourceType()); } // check srcProperty is readable Method readMethod = sourceDescriptor.getReadMethod(); if (readMethod == null) { throw new IllegalArgumentException("property '" + sourceProperty + - "' " + "is not readable on type " + model.getSourceType()); + "' " + "is not readable on type " + model.getSourceType()); } // obtain dst descriptor @@ -565,14 +573,14 @@ public class BinderModelBuilder<S, T> { targetDescriptors.get(targetProperty); if (targetDescriptor == null) { throw new IllegalArgumentException("no property '" + - targetProperty + "' " + "found on type " + - model.getTargetType()); + targetProperty + "' " + "found on type " + + model.getTargetType()); } // check dstProperty is writable Method writeMethod = targetDescriptor.getWriteMethod(); if (writeMethod == null) { throw new IllegalArgumentException("property '" + targetProperty + - "' " + "is not writable on type " + model.getTargetType()); + "' " + "is not writable on type " + model.getTargetType()); } // check types are ok @@ -581,9 +589,9 @@ public class BinderModelBuilder<S, T> { //TODO-TC20100221 : should check if primitive and boxed it in such case if (!sourceType.equals(targetType) && !canTypeMismatch) { throw new IllegalArgumentException("source property '" + - sourceProperty + "' and target property '" + - targetProperty + "' are not compatible ( sourceType : " + - sourceType + " vs targetType :" + targetType + ')'); + sourceProperty + "' and target property '" + + targetProperty + "' are not compatible ( sourceType : " + + sourceType + " vs targetType :" + targetType + ')'); } // check srcProperty does not exist @@ -599,7 +607,7 @@ public class BinderModelBuilder<S, T> { // property for the entry and this is a bit unatural if (model.containsTargetProperty(targetProperty)) { throw new IllegalArgumentException("destination property '" + - targetProperty + "' " + " was already registred."); + targetProperty + "' " + " was already registred."); } // safe to add the binding model.addBinding(sourceDescriptor, targetDescriptor); @@ -629,7 +637,7 @@ public class BinderModelBuilder<S, T> { } } catch (IntrospectionException e) { throw new RuntimeException("Could not obtain bean properties " + - "descriptors for source type " + type, e); + "descriptors for source type " + type, e); } Class<?>[] interfaces = type.getInterfaces(); for (Class<?> i : interfaces) { diff --git a/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java b/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java index 4bb4118..62442f7 100644 --- a/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java +++ b/src/main/java/org/nuiton/util/converter/FormatConverterFactory.java @@ -105,10 +105,9 @@ public class FormatConverterFactory { // FormatConverterFactory } /** - * @param clazz - * @param format + * @param clazz FIXME + * @param format FIXME * @return retourne null si aucun converter trouvé - * @see #getConverter(Class, Format, FormatConverter) */ public FormatConverter<?> getConverter(Class<?> clazz, Format format) { return getConverter(clazz, format, null); @@ -153,10 +152,9 @@ public class FormatConverterFactory { // FormatConverterFactory } /** - * @param clazz - * @param format + * @param clazz FIXME + * @param format FIXME * @return retourne null si aucun converter trouvé - * @see #findConverter(Class, Format, FormatConverter) */ public FormatConverter<?> findConverter(Class<?> clazz, Format format) { return findConverter(clazz, format, null); diff --git a/src/main/java/org/nuiton/util/converter/FormatMap.java b/src/main/java/org/nuiton/util/converter/FormatMap.java index a4c9282..c16d1b8 100644 --- a/src/main/java/org/nuiton/util/converter/FormatMap.java +++ b/src/main/java/org/nuiton/util/converter/FormatMap.java @@ -94,7 +94,7 @@ public class FormatMap extends HashMap<FormatMap.Format, Object> { // FormatMap * sont oubliées et seront recalculé en fonction de cette nouvelle valeur * * @param format le format a utiliser - * @param value + * @param value FIXME */ public void setValue(Format format, Object value) { clear(); @@ -152,7 +152,7 @@ public class FormatMap extends HashMap<FormatMap.Format, Object> { // FormatMap * Utilise le FormatConverterFactory par defaut pour la conversion * * @param format le format utilise - * @param args + * @param args FIXME * @return l'objet java */ public Object unconvert(Format format, Object... args) { diff --git a/src/main/java/org/nuiton/util/version/SemVer.java b/src/main/java/org/nuiton/util/version/SemVer.java index 2d74a5e..1d70292 100644 --- a/src/main/java/org/nuiton/util/version/SemVer.java +++ b/src/main/java/org/nuiton/util/version/SemVer.java @@ -110,7 +110,7 @@ public class SemVer implements Comparable<SemVer> { /** * Create new Version object, strip is done on argument to remove extra space - * @param versionString + * @param versionString FIXME * @exception IllegalArgumentException if argument isn't valid version string */ public SemVer(String versionString) { @@ -165,8 +165,8 @@ public class SemVer implements Comparable<SemVer> { /** * Compare deux elements de meme semantique (version, prerelease, build, snapshot) * sinon le comportement est non predictible - * @param a - * @param b + * @param a FIXME + * @param b FIXME * @param nullIsHigh indique si un des elements est null, s'il est plus * grand ou plus petit que l'autre * @return negatif si a inferieur b, 0 si a == b, positif si a superieur a b @@ -214,9 +214,9 @@ public class SemVer implements Comparable<SemVer> { * * 1.0 est plus grand que 1.0-Beta * - * @param a - * @param b - * @return + * @param a FIXME + * @param b FIXME + * @return FIXME */ protected int nullIsHigh(String a, String b) { int result = 0; @@ -236,9 +236,9 @@ public class SemVer implements Comparable<SemVer> { * * 1.0+r123 est plus grand que 1.0 * - * @param a - * @param b - * @return + * @param a FIXME + * @param b FIXME + * @return FIXME */ protected int nullIsLow(String a, String b) { int result = 0; @@ -259,7 +259,8 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2</li> * </ul> * - * @return + * @param element FIXME + * @return FIXME */ protected int getComposantCount(String element) { int result = 0; @@ -271,8 +272,9 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * @param element FIXME + * @param i FIXME + * @return FIXME */ protected String getComposant(String element, int i) { String[] v = StringUtils.split(element, SERIES_SEPARATOR); @@ -296,7 +298,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2</li> * </ul> * - * @return + * @return FIXME */ public int getVersionCount() { int result = getComposantCount(getVersion()); @@ -305,8 +307,8 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * @param i FIXME + * @return FIXME */ public String getVersion(int i) { String s = getComposant(getVersion(), i); @@ -339,7 +341,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2</li> * </ul> * - * @return + * @return FIXME */ public int getPrereleaseCount() { int result = getComposantCount(getPrerelease()); @@ -348,8 +350,8 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * @param i FIXME + * @return FIXME */ public String getPrerelease(int i) { String s = getComposant(getPrerelease(), i); @@ -367,7 +369,7 @@ public class SemVer implements Comparable<SemVer> { * <li>99.100 retourne 2</li> * </ul> * - * @return + * @return FIXME */ public int getBuildCount() { int result = getComposantCount(getBuild()); @@ -376,8 +378,8 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un des composants de l'element version - * @param i - * @return + * @param i FIXME + * @return FIXME */ public String getBuild(int i) { String s = getComposant(getBuild(), i); @@ -437,7 +439,7 @@ public class SemVer implements Comparable<SemVer> { /** * Retourne un objet creator initialise avec les donnees de ce SemVer * ce qui permet de creer un nouveau SemVer en modifiant un des elements - * @return + * @return FIXME */ public SemVerCreator getCreator() { return creator(this); @@ -445,8 +447,8 @@ public class SemVer implements Comparable<SemVer> { /** * Indique si la chaine represente bien une version au format SemVer - * @param version - * @return + * @param version FIXME + * @return FIXME */ static public boolean isSemVer(String version) { if (StringUtils.endsWithIgnoreCase(version, SNAPSHOT)) { @@ -464,7 +466,8 @@ public class SemVer implements Comparable<SemVer> { * SemVer v = SemVer.creator().setVersion("1.2").setPrerelease("beta.1").setBuild("r123").done(); * SemVer v = SemVer.creator("1.2", "beta.1","r123", SemVer.SNAPSHOT).done(); * </pre> - * @return + * @param v FIXME + * @return FIXME */ static public SemVerCreator creator(String ... v) { SemVerCreator result = new SemVerCreator(); @@ -501,8 +504,8 @@ public class SemVer implements Comparable<SemVer> { /** * Createur qui permet de passer en parametre les different composante de * l'element version - * @param v - * @return + * @param v FIXME + * @return FIXME */ static public SemVerCreator creator(int ... v) { SemVerCreator result = creator(StringUtils.join(v, SERIES_SEPARATOR)); @@ -515,8 +518,8 @@ public class SemVer implements Comparable<SemVer> { * * SemVer n = SemVer.creator(v).setBuild("r123").setSnapshot(false).done(); * - * @param v - * @return + * @param v FIXME + * @return FIXME */ static public SemVerCreator creator(SemVer v) { SemVerCreator result = creator( @@ -529,7 +532,7 @@ public class SemVer implements Comparable<SemVer> { * aussi de desambiguise les deux autres methode creator qui si elle * n'ont pas de parametre sont semblable * - * @return + * @return FIXME */ static public SemVerCreator creator() { SemVerCreator result = new SemVerCreator(); diff --git a/src/main/java/org/nuiton/util/version/Versions.java b/src/main/java/org/nuiton/util/version/Versions.java index 189a14d..58bf035 100644 --- a/src/main/java/org/nuiton/util/version/Versions.java +++ b/src/main/java/org/nuiton/util/version/Versions.java @@ -29,7 +29,7 @@ import java.util.List; /** * Useful class around {@link Version}. - * + * <p> * Created on 8/23/14. * * @author Tony Chemit - chemit@codelutin.com @@ -164,16 +164,17 @@ public class Versions { /** * Creates a new version from this one incremented. - * + * <p> * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * + * <p> * Example: * <ul> * <li>1 → 2</li> * <li>1-a → 1-a.1</li> * </ul> * + * @param version FIXME * @return the incremented version */ public static Version increments(Version version) { @@ -185,16 +186,17 @@ public class Versions { /** * Creates a new version from this one incremented. - * + * <p> * If the last componant is a number, then just increments this number; otherwise add a new * number componant with value 1. - * + * <p> * Example: * <ul> * <li>1 → 2</li> * <li>1-a → 1-a.1</li> * </ul> * + * @param version FIXME * @param componantSeperator the componant separator to use the last componant is a classifier * @return the incremented version */ @@ -230,10 +232,11 @@ public class Versions { /** * Creates a new version from this one with the number componant incremented at the given position. - * + * <p> * <strong>Note:</strong> * Will fail if the componant at the required position is not a number. * + * @param version FIXME * @param componantPosition position of the version componant to increment * @return the incremented version */ @@ -252,10 +255,11 @@ public class Versions { /** * Creates a new version from this one with the number componant decremented at the given position. - * + * <p> * <strong>Note:</strong> * Will fail if the componant at the required position is not a number, or his value is 0. * + * @param version FIXME * @param componantPosition position of the version componant to increment * @return the decremented version */ -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git commit 4d0e450ce19604707155c19d3d8aed33c0a8c1ab Merge: e46e40c 19ab5ac Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Jan 10 13:45:42 2016 +0100 Fixes #3797 Merge branch 'feature/3797_javadoc_8' into develop src/main/java/org/nuiton/util/AliasMap.java | 39 +-- src/main/java/org/nuiton/util/ArrayUtil.java | 18 +- src/main/java/org/nuiton/util/BoundedList.java | 25 +- .../util/BoundedListOutOfBoundsException.java | 14 +- src/main/java/org/nuiton/util/CallAnalyse.java | 57 ++-- .../java/org/nuiton/util/CardinalityHelper.java | 34 +-- .../org/nuiton/util/CategorisedListenerSet.java | 4 +- src/main/java/org/nuiton/util/ClassLoaderUtil.java | 6 +- src/main/java/org/nuiton/util/CollectionUtil.java | 48 ++-- src/main/java/org/nuiton/util/DateUtil.java | 15 +- src/main/java/org/nuiton/util/DesktopUtil.java | 8 +- src/main/java/org/nuiton/util/DigestGenerator.java | 74 ++--- .../nuiton/util/FasterCachedResourceResolver.java | 15 +- src/main/java/org/nuiton/util/FileUtil.java | 189 ++++++------- src/main/java/org/nuiton/util/GZUtil.java | 24 +- src/main/java/org/nuiton/util/GZUtilException.java | 2 +- src/main/java/org/nuiton/util/HashList.java | 4 +- src/main/java/org/nuiton/util/LRUMapMultiKey.java | 16 +- src/main/java/org/nuiton/util/ListenerSet.java | 4 +- .../java/org/nuiton/util/LoggingException.java | 3 +- .../org/nuiton/util/LoggingPatternFormatter.java | 81 +++--- src/main/java/org/nuiton/util/MD5InputStream.java | 4 +- src/main/java/org/nuiton/util/MatrixMap.java | 304 ++++++++++++--------- src/main/java/org/nuiton/util/MonthEnum.java | 2 +- src/main/java/org/nuiton/util/NumberUtil.java | 2 +- src/main/java/org/nuiton/util/ObjectUtil.java | 62 +++-- src/main/java/org/nuiton/util/PagerBean.java | 4 +- src/main/java/org/nuiton/util/PagerBeanUtil.java | 6 +- src/main/java/org/nuiton/util/PeriodDates.java | 5 +- .../util/PropertiesDateRemoveFilterStream.java | 6 +- .../java/org/nuiton/util/RecursiveProperties.java | 6 +- src/main/java/org/nuiton/util/ReflectUtil.java | 33 ++- src/main/java/org/nuiton/util/Resource.java | 38 +-- .../java/org/nuiton/util/ResourceException.java | 3 +- .../org/nuiton/util/ResourceNotFoundException.java | 3 +- .../java/org/nuiton/util/ResourceResolver.java | 39 +-- .../java/org/nuiton/util/ReverseFileReader.java | 3 +- src/main/java/org/nuiton/util/SemVer.java | 212 ++++++++------ .../java/org/nuiton/util/SortedProperties.java | 4 +- src/main/java/org/nuiton/util/StringUtil.java | 46 ++-- .../java/org/nuiton/util/StringUtilException.java | 1 - src/main/java/org/nuiton/util/TimeLog.java | 15 +- .../org/nuiton/util/TransparenteSoftReference.java | 2 +- .../org/nuiton/util/TransparenteWeakReference.java | 4 +- src/main/java/org/nuiton/util/Version.java | 37 ++- src/main/java/org/nuiton/util/VersionUtil.java | 50 ++-- src/main/java/org/nuiton/util/ZipUtil.java | 45 ++- .../java/org/nuiton/util/beans/BeanMonitor.java | 18 +- src/main/java/org/nuiton/util/beans/BeanUtil.java | 5 +- src/main/java/org/nuiton/util/beans/Binder.java | 28 +- .../java/org/nuiton/util/beans/BinderFactory.java | 30 +- .../org/nuiton/util/beans/BinderModelBuilder.java | 109 ++++---- .../org/nuiton/util/beans/InstanceFactory.java | 4 +- .../java/org/nuiton/util/beans/PropertyDiff.java | 2 +- .../java/org/nuiton/util/beans/package-info.java | 14 +- .../org/nuiton/util/converter/ColorConverter.java | 4 +- .../org/nuiton/util/converter/ConverterUtil.java | 10 +- .../org/nuiton/util/converter/EnumConverter.java | 6 +- .../org/nuiton/util/converter/FormatConverter.java | 14 +- .../util/converter/FormatConverterFactory.java | 17 +- .../java/org/nuiton/util/converter/FormatMap.java | 15 +- .../nuiton/util/converter/KeyStrokeConverter.java | 5 +- .../org/nuiton/util/converter/URIConverter.java | 2 +- .../org/nuiton/util/converter/URLConverter.java | 2 +- .../nuiton/util/converter/VersionConverter.java | 2 +- .../org/nuiton/util/converter/package-info.java | 8 +- .../util/pagination/PaginationParameter.java | 14 +- .../org/nuiton/util/rmi/RemoteMethodExecutor.java | 2 +- .../nuiton/util/rmi/RemoteMethodExecutorImpl.java | 2 +- .../org/nuiton/util/rmi/RemoteProxyFactory.java | 6 +- .../java/org/nuiton/util/rmi/ServiceExporter.java | 2 +- .../java/org/nuiton/util/rmi/package-info.java | 6 +- src/main/java/org/nuiton/util/version/SemVer.java | 123 +++++---- src/main/java/org/nuiton/util/version/Version.java | 34 +-- .../org/nuiton/util/version/VersionBuilder.java | 4 +- .../org/nuiton/util/version/VersionComparator.java | 28 +- .../org/nuiton/util/version/VersionConverter.java | 2 +- .../java/org/nuiton/util/version/Versions.java | 26 +- src/test/java/org/nuiton/util/AliasMapTest.java | 16 +- src/test/java/org/nuiton/util/CallAnalyseTest.java | 20 +- .../org/nuiton/util/CardinalityHelperTest.java | 2 +- .../nuiton/util/CategorisedListenerSetTest.java | 18 +- .../java/org/nuiton/util/CollectionUtilTest.java | 2 +- src/test/java/org/nuiton/util/FileUtilTest.java | 16 +- .../java/org/nuiton/util/LRUMapMultiKeyTest.java | 19 +- src/test/java/org/nuiton/util/ListenerSetTest.java | 2 +- .../java/org/nuiton/util/MD5InputStreamTest.java | 2 +- src/test/java/org/nuiton/util/MatrixMapTest.java | 7 +- src/test/java/org/nuiton/util/NumberUtilTest.java | 2 +- src/test/java/org/nuiton/util/ObjectUtilTest.java | 44 ++- .../java/org/nuiton/util/PagerBeanUtilTest.java | 2 +- .../org/nuiton/util/RecursivePropertiesTest.java | 11 +- src/test/java/org/nuiton/util/ReflectUtilTest.java | 2 +- src/test/java/org/nuiton/util/ResourceTest.java | 2 +- .../org/nuiton/util/ReverseFileReaderTest.java | 12 +- src/test/java/org/nuiton/util/SemVerTest.java | 28 +- src/test/java/org/nuiton/util/StringUtilTest.java | 14 +- .../org/nuiton/util/TransparenteReferenceTest.java | 18 +- src/test/java/org/nuiton/util/VersionTest.java | 11 +- src/test/java/org/nuiton/util/VersionUtilTest.java | 2 +- src/test/java/org/nuiton/util/ZipUtilTest.java | 26 +- src/test/java/org/nuiton/util/beans/BeanC.java | 2 +- .../org/nuiton/util/beans/BeanMonitorTest.java | 4 +- .../java/org/nuiton/util/beans/BeanUtilTest.java | 2 +- .../org/nuiton/util/beans/BinderFactoryTest.java | 2 +- .../nuiton/util/beans/BinderModelBuilderTest.java | 20 +- .../java/org/nuiton/util/beans/BinderTest.java | 12 +- .../nuiton/util/converter/ConverterUtilTest.java | 2 +- .../util/converter/UnregistreableConverter.java | 2 +- .../util/converter/VersionConverterTest.java | 2 +- .../java/org/nuiton/util/rmi/AnyException.java | 2 +- .../nuiton/util/rmi/RmiExporterAndProxyTest.java | 3 +- src/test/java/org/nuiton/util/rmi/SomeBean.java | 2 +- src/test/java/org/nuiton/util/rmi/SomeService.java | 2 +- .../java/org/nuiton/util/rmi/SomeServiceImpl.java | 2 +- .../java/org/nuiton/util/version/SemVerTest.java | 24 +- .../resources/org/nuiton/util/fileUtilData.txt | 18 +- 117 files changed, 1285 insertions(+), 1254 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm