From 776b63d5b8512f9af90a7be822bf52d4b794836f Mon Sep 17 00:00:00 2001 From: Igor Akkerman Date: Thu, 26 Mar 2015 19:30:27 +0100 Subject: [PATCH] Project restructured for more modularization --- jlib-container.iml | 14 ++++---- pom.xml | 32 +++++++++---------- .../container/iterator/IterableUtility.java | 10 +++--- .../iterator/NoItemToReplaceException.java | 2 +- .../iterator/ObservedRemoveIterable.java | 2 +- .../iterator/ObservedRemoveIterator.java | 6 ++-- .../container/iterator/ReplaceIterator.java | 2 +- .../iterator/ReplaceRemoveIterable.java | 2 +- .../iterator/ReplaceRemoveIterator.java | 2 +- .../operation/ForbiddenCastException.java | 4 +-- .../operation/FromIteratorIsEmpty.java | 2 +- .../InvalidContainerArgumentException.java | 6 ++-- .../InvalidContainerStateException.java | 6 ++-- .../ItemAlreadyContainedException.java | 2 +- .../ItemToRemoveNotContainedException.java | 2 +- .../ContainsAdapterUtility.java | 2 +- .../IterativeContainsAdapter.java | 4 +-- .../jlib/container/storage/IndexRange.java | 6 ++-- .../IndexRangeOperationDescriptor.java | 2 +- .../InvalidAdditionalCapacityException.java | 2 +- .../InvalidStorageArgumentException.java | 4 +-- .../InvalidStorageCapacityException.java | 2 +- .../storage/InvalidStorageIndexException.java | 2 +- .../container/storage/array/ArrayStorage.java | 6 ++-- .../capacity/AbstractCapacityStrategy.java | 2 +- .../capacity/InvalidCapacityException.java | 2 +- 26 files changed, 64 insertions(+), 64 deletions(-) diff --git a/jlib-container.iml b/jlib-container.iml index ff13559e..476720ee 100644 --- a/jlib-container.iml +++ b/jlib-container.iml @@ -1,6 +1,6 @@ - + @@ -10,18 +10,20 @@ + + + + + + + - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index b4c23958..59417864 100644 --- a/pom.xml +++ b/pom.xml @@ -50,42 +50,44 @@ org.jlib - jlib-core + jlib-codequality org.jlib - jlib-basefunctions + jlib-core org.jlib - jlib-operator + jlib-basefunctions - junit - junit + org.jlib + jlib-iterator - com.google.guava - guava + org.jlib + jlib-array - org.apache.commons - commons-lang3 + org.jlib + jlib-operator - org.apache.commons - commons-collections4 + org.checkerframework + checker-qual + + - org.checkerframework - checker-qual + junit + junit @@ -98,9 +100,5 @@ mockito-core - - org.jlib - jlib-codequality - diff --git a/src/main/java/org/jlib/container/iterator/IterableUtility.java b/src/main/java/org/jlib/container/iterator/IterableUtility.java index 2c6130c5..77f87536 100644 --- a/src/main/java/org/jlib/container/iterator/IterableUtility.java +++ b/src/main/java/org/jlib/container/iterator/IterableUtility.java @@ -23,11 +23,11 @@ import java.util.Iterator; -import org.jlib.core.iterator.BidiIterable; -import org.jlib.core.iterator.InvalidIterableStateException; -import org.jlib.core.iterator.RemoveIterable; -import org.jlib.core.iterator.RemoveIterator; -import org.jlib.core.iterator.SingletonIterable; +import org.jlib.iterator.BidiIterable; +import org.jlib.iterator.InvalidIterableStateException; +import org.jlib.iterator.RemoveIterable; +import org.jlib.iterator.RemoveIterator; +import org.jlib.iterator.SingletonIterable; import org.jlib.operator.observer.Observer; diff --git a/src/main/java/org/jlib/container/iterator/NoItemToReplaceException.java b/src/main/java/org/jlib/container/iterator/NoItemToReplaceException.java index a938b7be..f652ff55 100644 --- a/src/main/java/org/jlib/container/iterator/NoItemToReplaceException.java +++ b/src/main/java/org/jlib/container/iterator/NoItemToReplaceException.java @@ -23,7 +23,7 @@ import java.util.Iterator; -import org.jlib.core.iterator.InvalidIteratorStateException; +import org.jlib.iterator.InvalidIteratorStateException; /** * {@link InvalidIteratorStateException} thrown when there is Item to remove by diff --git a/src/main/java/org/jlib/container/iterator/ObservedRemoveIterable.java b/src/main/java/org/jlib/container/iterator/ObservedRemoveIterable.java index e2c4bd49..d3c59053 100644 --- a/src/main/java/org/jlib/container/iterator/ObservedRemoveIterable.java +++ b/src/main/java/org/jlib/container/iterator/ObservedRemoveIterable.java @@ -21,7 +21,7 @@ package org.jlib.container.iterator; -import org.jlib.core.iterator.RemoveIterable; +import org.jlib.iterator.RemoveIterable; /** * Object providing a {@link ObservedRemoveIterable} over its Items. diff --git a/src/main/java/org/jlib/container/iterator/ObservedRemoveIterator.java b/src/main/java/org/jlib/container/iterator/ObservedRemoveIterator.java index a9922fe1..5ced7d3f 100644 --- a/src/main/java/org/jlib/container/iterator/ObservedRemoveIterator.java +++ b/src/main/java/org/jlib/container/iterator/ObservedRemoveIterator.java @@ -21,9 +21,9 @@ package org.jlib.container.iterator; -import org.jlib.core.iterator.InvalidIterableStateException; -import org.jlib.core.iterator.NoItemToRemoveException; -import org.jlib.core.iterator.RemoveIterator; +import org.jlib.iterator.InvalidIterableStateException; +import org.jlib.iterator.NoItemToRemoveException; +import org.jlib.iterator.RemoveIterator; import org.jlib.operator.observer.Observer; import org.jlib.operator.observer.ObserverException; diff --git a/src/main/java/org/jlib/container/iterator/ReplaceIterator.java b/src/main/java/org/jlib/container/iterator/ReplaceIterator.java index f2975299..6911f7e5 100644 --- a/src/main/java/org/jlib/container/iterator/ReplaceIterator.java +++ b/src/main/java/org/jlib/container/iterator/ReplaceIterator.java @@ -23,7 +23,7 @@ import java.util.Iterator; -import org.jlib.core.iterator.InvalidIteratorStateException; +import org.jlib.iterator.InvalidIteratorStateException; /** * {@link Iterator} over replaceable Items. diff --git a/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterable.java b/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterable.java index 90b2be3e..548e57ab 100644 --- a/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterable.java +++ b/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterable.java @@ -21,7 +21,7 @@ package org.jlib.container.iterator; -import org.jlib.core.iterator.RemoveIterable; +import org.jlib.iterator.RemoveIterable; /** * Object providing allowing Items to be removed. diff --git a/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterator.java b/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterator.java index cb88d71d..ef4ed454 100644 --- a/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterator.java +++ b/src/main/java/org/jlib/container/iterator/ReplaceRemoveIterator.java @@ -21,7 +21,7 @@ package org.jlib.container.iterator; -import org.jlib.core.iterator.RemoveIterator; +import org.jlib.iterator.RemoveIterator; /** * {@link ReplaceIterator} and {@link RemoveIterator}. diff --git a/src/main/java/org/jlib/container/operation/ForbiddenCastException.java b/src/main/java/org/jlib/container/operation/ForbiddenCastException.java index 643c46a8..acb4b730 100644 --- a/src/main/java/org/jlib/container/operation/ForbiddenCastException.java +++ b/src/main/java/org/jlib/container/operation/ForbiddenCastException.java @@ -21,9 +21,9 @@ package org.jlib.container.operation; -import org.jlib.core.exception.InvalidStateException; +import org.jlib.exception.InvalidStateException; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; public class ForbiddenCastException extends InvalidStateException { diff --git a/src/main/java/org/jlib/container/operation/FromIteratorIsEmpty.java b/src/main/java/org/jlib/container/operation/FromIteratorIsEmpty.java index 933991e6..393ae68e 100644 --- a/src/main/java/org/jlib/container/operation/FromIteratorIsEmpty.java +++ b/src/main/java/org/jlib/container/operation/FromIteratorIsEmpty.java @@ -21,7 +21,7 @@ package org.jlib.container.operation; -import org.jlib.core.iterator.IterableUtility; +import org.jlib.iterator.IterableUtility; public class FromIteratorIsEmpty implements IsEmpty { diff --git a/src/main/java/org/jlib/container/operation/InvalidContainerArgumentException.java b/src/main/java/org/jlib/container/operation/InvalidContainerArgumentException.java index 4282e37f..81f68a94 100644 --- a/src/main/java/org/jlib/container/operation/InvalidContainerArgumentException.java +++ b/src/main/java/org/jlib/container/operation/InvalidContainerArgumentException.java @@ -21,10 +21,10 @@ package org.jlib.container.operation; -import org.jlib.core.exception.InvalidArgumentException; -import org.jlib.core.message.Message; +import org.jlib.exception.InvalidArgumentException; +import org.jlib.message.Message; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; public abstract class InvalidContainerArgumentException extends InvalidArgumentException { diff --git a/src/main/java/org/jlib/container/operation/InvalidContainerStateException.java b/src/main/java/org/jlib/container/operation/InvalidContainerStateException.java index cf42a158..2c39ac03 100644 --- a/src/main/java/org/jlib/container/operation/InvalidContainerStateException.java +++ b/src/main/java/org/jlib/container/operation/InvalidContainerStateException.java @@ -21,10 +21,10 @@ package org.jlib.container.operation; -import org.jlib.core.exception.InvalidStateException; -import org.jlib.core.message.Message; +import org.jlib.exception.InvalidStateException; +import org.jlib.message.Message; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; public abstract class InvalidContainerStateException extends InvalidStateException { diff --git a/src/main/java/org/jlib/container/operation/ItemAlreadyContainedException.java b/src/main/java/org/jlib/container/operation/ItemAlreadyContainedException.java index 13004139..e3dc9a5b 100644 --- a/src/main/java/org/jlib/container/operation/ItemAlreadyContainedException.java +++ b/src/main/java/org/jlib/container/operation/ItemAlreadyContainedException.java @@ -22,7 +22,7 @@ package org.jlib.container.operation; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; /** * {@link InvalidContainerArgumentException} thrown when trying to invalidly add diff --git a/src/main/java/org/jlib/container/operation/ItemToRemoveNotContainedException.java b/src/main/java/org/jlib/container/operation/ItemToRemoveNotContainedException.java index 5d739f22..5fe923ab 100644 --- a/src/main/java/org/jlib/container/operation/ItemToRemoveNotContainedException.java +++ b/src/main/java/org/jlib/container/operation/ItemToRemoveNotContainedException.java @@ -21,7 +21,7 @@ package org.jlib.container.operation; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; /** * {@link InvalidContainerArgumentException} thrown when a {@link RemoveSingleByValue} does not contain diff --git a/src/main/java/org/jlib/container/operation/containsadapter/ContainsAdapterUtility.java b/src/main/java/org/jlib/container/operation/containsadapter/ContainsAdapterUtility.java index 3e4bbcac..b0df8841 100644 --- a/src/main/java/org/jlib/container/operation/containsadapter/ContainsAdapterUtility.java +++ b/src/main/java/org/jlib/container/operation/containsadapter/ContainsAdapterUtility.java @@ -23,7 +23,7 @@ import java.util.Collection; -import org.jlib.core.array.ArrayUtility; +import org.jlib.array.ArrayUtility; import org.jlib.container.operation.ContainsSingle; import org.jlib.container.operation.InvalidContainerArgumentException; diff --git a/src/main/java/org/jlib/container/operation/containsadapter/IterativeContainsAdapter.java b/src/main/java/org/jlib/container/operation/containsadapter/IterativeContainsAdapter.java index 60afd48f..958e5e0d 100644 --- a/src/main/java/org/jlib/container/operation/containsadapter/IterativeContainsAdapter.java +++ b/src/main/java/org/jlib/container/operation/containsadapter/IterativeContainsAdapter.java @@ -21,11 +21,11 @@ package org.jlib.container.operation.containsadapter; -import org.jlib.core.iterator.IterableUtility; - import org.jlib.container.operation.InvalidContainerArgumentException; import org.jlib.container.operation.InvalidContainerStateException; +import org.jlib.iterator.IterableUtility; + public class IterativeContainsAdapter extends ContainsAdapter { diff --git a/src/main/java/org/jlib/container/storage/IndexRange.java b/src/main/java/org/jlib/container/storage/IndexRange.java index eb79514c..6357ab47 100644 --- a/src/main/java/org/jlib/container/storage/IndexRange.java +++ b/src/main/java/org/jlib/container/storage/IndexRange.java @@ -23,10 +23,10 @@ import java.io.Serializable; -import org.jlib.core.exception.UnexpectedStateException; -import org.jlib.core.language.Valid; +import org.jlib.core.Valid; -import static org.jlib.core.math.NumberUtility.count; +import static org.jlib.core.IndexUtility.count; +import org.jlib.exception.UnexpectedStateException; /** * Modifiable {@link Integer} index range. diff --git a/src/main/java/org/jlib/container/storage/IndexRangeOperationDescriptor.java b/src/main/java/org/jlib/container/storage/IndexRangeOperationDescriptor.java index 6480339a..a7b11d25 100644 --- a/src/main/java/org/jlib/container/storage/IndexRangeOperationDescriptor.java +++ b/src/main/java/org/jlib/container/storage/IndexRangeOperationDescriptor.java @@ -23,7 +23,7 @@ import java.io.Serializable; -import org.jlib.core.exception.UnexpectedStateException; +import org.jlib.exception.UnexpectedStateException; /** * Descriptor of an operation on indexed objects specifying a source index range and a target index. diff --git a/src/main/java/org/jlib/container/storage/InvalidAdditionalCapacityException.java b/src/main/java/org/jlib/container/storage/InvalidAdditionalCapacityException.java index 83ceecdb..2b638656 100644 --- a/src/main/java/org/jlib/container/storage/InvalidAdditionalCapacityException.java +++ b/src/main/java/org/jlib/container/storage/InvalidAdditionalCapacityException.java @@ -21,7 +21,7 @@ package org.jlib.container.storage; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; public class InvalidAdditionalCapacityException extends InvalidStorageArgumentException { diff --git a/src/main/java/org/jlib/container/storage/InvalidStorageArgumentException.java b/src/main/java/org/jlib/container/storage/InvalidStorageArgumentException.java index 6e32bfa2..52a9cffb 100644 --- a/src/main/java/org/jlib/container/storage/InvalidStorageArgumentException.java +++ b/src/main/java/org/jlib/container/storage/InvalidStorageArgumentException.java @@ -21,8 +21,8 @@ package org.jlib.container.storage; -import org.jlib.core.exception.InvalidArgumentException; -import org.jlib.core.message.Message; +import org.jlib.exception.InvalidArgumentException; +import org.jlib.message.Message; /** * {@link InvalidArgumentException} thrown when an invalid diff --git a/src/main/java/org/jlib/container/storage/InvalidStorageCapacityException.java b/src/main/java/org/jlib/container/storage/InvalidStorageCapacityException.java index 4ffe9ba3..dd1eb163 100644 --- a/src/main/java/org/jlib/container/storage/InvalidStorageCapacityException.java +++ b/src/main/java/org/jlib/container/storage/InvalidStorageCapacityException.java @@ -21,7 +21,7 @@ package org.jlib.container.storage; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; /** * {@link InvalidStorageArgumentException} thrown when an invalid capacity of an {@link LinearIndexStorage} is diff --git a/src/main/java/org/jlib/container/storage/InvalidStorageIndexException.java b/src/main/java/org/jlib/container/storage/InvalidStorageIndexException.java index 134d51e1..4d216654 100644 --- a/src/main/java/org/jlib/container/storage/InvalidStorageIndexException.java +++ b/src/main/java/org/jlib/container/storage/InvalidStorageIndexException.java @@ -21,7 +21,7 @@ package org.jlib.container.storage; -import org.jlib.core.message.Message; +import org.jlib.message.Message; public class InvalidStorageIndexException extends InvalidStorageArgumentException { diff --git a/src/main/java/org/jlib/container/storage/array/ArrayStorage.java b/src/main/java/org/jlib/container/storage/array/ArrayStorage.java index 8bd68eab..9db89c56 100644 --- a/src/main/java/org/jlib/container/storage/array/ArrayStorage.java +++ b/src/main/java/org/jlib/container/storage/array/ArrayStorage.java @@ -21,7 +21,7 @@ package org.jlib.container.storage.array; -import org.jlib.core.language.Valid; +import org.jlib.core.Valid; import org.jlib.container.storage.AbstractLinearIndexStorage; import org.jlib.container.storage.IndexRangeOperationDescriptor; @@ -31,8 +31,8 @@ import static java.lang.System.arraycopy; import static java.util.Arrays.copyOf; -import static org.jlib.core.array.ArrayUtility.array; -import static org.jlib.core.math.NumberUtility.count; +import static org.jlib.array.ArrayUtility.array; +import static org.jlib.core.IndexUtility.count; /** * {@link LinearIndexStorage} based on an array. diff --git a/src/main/java/org/jlib/container/storage/capacity/AbstractCapacityStrategy.java b/src/main/java/org/jlib/container/storage/capacity/AbstractCapacityStrategy.java index 91b0d1df..8f30d8cd 100644 --- a/src/main/java/org/jlib/container/storage/capacity/AbstractCapacityStrategy.java +++ b/src/main/java/org/jlib/container/storage/capacity/AbstractCapacityStrategy.java @@ -27,7 +27,7 @@ import org.jlib.container.storage.LinearIndexStorage; import org.jlib.basefunctions.ApplicationObject; -import static org.jlib.core.message.MessageUtility.mfmessage; +import static org.jlib.message.MessageUtility.mfmessage; public abstract class AbstractCapacityStrategy extends ApplicationObject { diff --git a/src/main/java/org/jlib/container/storage/capacity/InvalidCapacityException.java b/src/main/java/org/jlib/container/storage/capacity/InvalidCapacityException.java index 8db94795..9ca71ca9 100644 --- a/src/main/java/org/jlib/container/storage/capacity/InvalidCapacityException.java +++ b/src/main/java/org/jlib/container/storage/capacity/InvalidCapacityException.java @@ -24,7 +24,7 @@ import org.jlib.container.storage.LinearIndexStorage; import org.jlib.container.storage.InvalidStorageArgumentException; -import static org.jlib.core.message.MessageUtility.message; +import static org.jlib.message.MessageUtility.message; public class InvalidCapacityException extends InvalidStorageArgumentException {