Enabled Eclipses JavaDoc Compiler to find issues with existing javadoc
-Fixed: Bunch of JavaDoc issues.
This commit is contained in:
parent
06752fe30c
commit
52d5155565
|
@ -8,15 +8,17 @@ import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;
|
|||
public interface BI_ITERATOR KEY_GENERIC_TYPE extends ITERATOR KEY_GENERIC_TYPE, ObjectBidirectionalIterator<CLASS_TYPE>
|
||||
#else
|
||||
/**
|
||||
* This is a basically a {@link ListIterator} without the index functions.
|
||||
* This is a basically a {@link java.util.ListIterator} without the index functions.
|
||||
* Allowing to have a simple Bidirectional Iterator without having to keep track of the Iteration index.
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
*/
|
||||
public interface BI_ITERATOR KEY_GENERIC_TYPE extends ITERATOR KEY_GENERIC_TYPE
|
||||
#endif
|
||||
{
|
||||
/**
|
||||
* Returns true if the Iterator has a Previous element
|
||||
* @return true if the Iterator has a Previouse element
|
||||
* @return true if the Iterator has a Previous element
|
||||
*/
|
||||
public boolean hasPrevious();
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@ import speiger.src.collections.utils.SanityChecks;
|
|||
#endif
|
||||
/**
|
||||
* A Type-Specific {@link Collection} that reduces (un)boxing
|
||||
#if TYPE_OBJECT
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
#endif
|
||||
*/
|
||||
public interface COLLECTION KEY_GENERIC_TYPE extends Collection<CLASS_TYPE>, ITERABLE KEY_GENERIC_TYPE
|
||||
{
|
||||
|
|
|
@ -9,6 +9,10 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
|||
|
||||
/**
|
||||
* A Type-Specific {@link Iterable} that reduces (un)boxing
|
||||
#if TYPE_OBJECT
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
#endif
|
||||
*/
|
||||
public interface ITERABLE KEY_GENERIC_TYPE extends Iterable<CLASS_TYPE>
|
||||
{
|
||||
|
|
|
@ -11,6 +11,10 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
|||
|
||||
/**
|
||||
* A Type-Specific {@link Iterator} that reduces (un)boxing
|
||||
#if TYPE_OBJECT
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
#endif
|
||||
*/
|
||||
public interface ITERATOR KEY_GENERIC_TYPE extends Iterator<CLASS_TYPE>
|
||||
{
|
||||
|
|
|
@ -10,6 +10,9 @@ public interface COMPARATOR extends Comparator<CLASS_TYPE>
|
|||
{
|
||||
/**
|
||||
* Type-Specific compare function to reduce (un)boxing
|
||||
* @param o1 the first object to be compared.
|
||||
* @param o2 the second object to be compared.
|
||||
* @return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
|
||||
* @see Comparator#compare(Object, Object)
|
||||
*/
|
||||
int compare(KEY_TYPE o1, KEY_TYPE o2);
|
||||
|
|
|
@ -11,6 +11,10 @@ import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
|||
|
||||
/**
|
||||
* Abstract implementation of the {@link LIST} interface.
|
||||
#if TYPE_OBJECT
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
#endif
|
||||
*/
|
||||
public abstract class ABSTRACT_LIST KEY_GENERIC_TYPE extends ABSTRACT_COLLECTION KEY_GENERIC_TYPE implements LIST KEY_GENERIC_TYPE
|
||||
{
|
||||
|
|
|
@ -42,6 +42,8 @@ import speiger.src.collections.utils.SanityChecks;
|
|||
*
|
||||
* <p>This implementation is optimized to improve how data is processed with interfaces like {@link IARRAY}, {@link Stack}
|
||||
* and with optimized functions that use type-specific implementations for primitives and optimized logic for bulkactions.
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
*/
|
||||
public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE implements IARRAY<KEY_TYPE>, Stack<KEY_TYPE>
|
||||
#else
|
||||
|
@ -70,6 +72,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList with the specific requested size
|
||||
* @param size the minimum initial size of the Backing array
|
||||
*/
|
||||
public ARRAY_LIST(int size) {
|
||||
data = NEW_KEY_ARRAY(size);
|
||||
|
@ -77,6 +80,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList a copy with the contents of the Collection.
|
||||
* @param c the elements that should be added into the list
|
||||
*/
|
||||
public ARRAY_LIST(Collection<? extends CLASS_TYPE> c) {
|
||||
this(c.size());
|
||||
|
@ -85,6 +89,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList a copy with the contents of the Collection.
|
||||
* @param c the elements that should be added into the list
|
||||
*/
|
||||
public ARRAY_LIST(COLLECTION KEY_GENERIC_TYPE c) {
|
||||
this(c.size());
|
||||
|
@ -93,6 +98,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList a copy with the contents of the List.
|
||||
* @param l the elements that should be added into the list
|
||||
*/
|
||||
public ARRAY_LIST(LIST KEY_GENERIC_TYPE l) {
|
||||
this(l.size());
|
||||
|
@ -102,6 +108,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList with a Copy of the array
|
||||
* @param a the array that should be copied
|
||||
*/
|
||||
public ARRAY_LIST(KEY_TYPE[] a) {
|
||||
this(a, 0, a.length);
|
||||
|
@ -109,6 +116,8 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList with a Copy of the array with a custom length
|
||||
* @param a the array that should be copied
|
||||
* @param length the desired length that should be copied
|
||||
*/
|
||||
public ARRAY_LIST(KEY_TYPE[] a, int length) {
|
||||
this(a, 0, length);
|
||||
|
@ -116,6 +125,11 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Creates a new ArrayList with a Copy of the array with in the custom range.
|
||||
* @param a the array that should be copied
|
||||
* @param offset the starting offset of where the array should be copied from
|
||||
* @param length the desired length that should be copied
|
||||
* @throws IllegalStateException if offset is smaller then 0
|
||||
* @throws IllegalStateException if the offset + length exceeds the array length
|
||||
*/
|
||||
public ARRAY_LIST(KEY_TYPE[] a, int offset, int length) {
|
||||
this(length);
|
||||
|
@ -134,7 +148,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a wrapped arraylist that uses the array as backing array and a custom fillsize
|
||||
* Creates a wrapped arraylist that uses the array as backing array and a custom fill size
|
||||
* @param a elements that should be wrapped
|
||||
* @param length the size of the elements within the array
|
||||
* @return a Wrapped list using the input array
|
||||
|
@ -199,7 +213,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Appends the specified elements to the index of the list.
|
||||
* This function may delegate to more appropiate function if nessesary
|
||||
* This function may delegate to more appropriate function if necessary
|
||||
* @param index the index where to append the elements to
|
||||
* @param c the elements to append to the list
|
||||
* @throws IndexOutOfBoundsException if index is outside of the lists range
|
||||
|
@ -221,7 +235,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* Appends the specified elements to the index of the list.
|
||||
* This function may delegate to more appropiate function if nessesary
|
||||
* This function may delegate to more appropriate function if necessary
|
||||
* @param index the index where to append the elements to
|
||||
* @param c the elements to append to the list
|
||||
* @throws IndexOutOfBoundsException if index is outside of the lists range
|
||||
|
@ -422,7 +436,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#stableSort(KEY_TYPE[], Comparator)
|
||||
*/
|
||||
@Override
|
||||
|
@ -434,7 +448,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#unstableSort(KEY_TYPE[], Comparator)
|
||||
*/
|
||||
@Override
|
||||
|
@ -483,7 +497,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(java.util.Comparator)
|
||||
* @see ARRAYS#stableSort(KEY_TYPE[], COMPARATOR)
|
||||
*/
|
||||
@Override
|
||||
|
@ -495,7 +509,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(java.util.Comparator)
|
||||
* @see ARRAYS#unstableSort(KEY_TYPE[], COMPARATOR)
|
||||
*/
|
||||
@Override
|
||||
|
@ -523,7 +537,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
* @param index of the element that should be provided
|
||||
* @return the element that was requested
|
||||
* @throws ArrayIndexOutOfBoundsException if the index is out of bounds
|
||||
* @see Stack#peek(int)
|
||||
* @see speiger.src.collections.utils.Stack#peek(int)
|
||||
*/
|
||||
@Override
|
||||
public KEY_TYPE PEEK(int index) {
|
||||
|
@ -552,8 +566,8 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
* }</pre>
|
||||
*
|
||||
* @param action The action to be performed for each element
|
||||
* @throws java.util.NullPointerException if the specified action is null
|
||||
* @see Iterable#forEach(Consumer)
|
||||
* @throws NullPointerException if the specified action is null
|
||||
* @see Iterable#forEach(java.util.function.Consumer)
|
||||
*/
|
||||
@Override
|
||||
public void forEach(CONSUMER KEY_SUPER_GENERIC_TYPE action) {
|
||||
|
@ -638,7 +652,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
/**
|
||||
* A Type-Specific implementation of remove. This implementation iterates over the elements until it finds the element that is searched for or it runs out of elements.
|
||||
* It stops after finding the first element
|
||||
* @param e the element that is searched for
|
||||
* @param type the element that is searched for
|
||||
* @return true if the element was found and removed.
|
||||
*/
|
||||
@Override
|
||||
|
@ -652,7 +666,6 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
#endif
|
||||
/**
|
||||
* A Type-Specific pop function to reduce (un)boxing
|
||||
* @param index the index of the element to fetch
|
||||
* @return the value of the requested index
|
||||
* @throws IndexOutOfBoundsException if the index is out of range
|
||||
*/
|
||||
|
@ -663,7 +676,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* A function to remove all elements that were provided in the other collection
|
||||
* This function might delegate to a more appropiate function if nessesary
|
||||
* This function might delegate to a more appropriate function if necessary
|
||||
* @param c the elements that should be removed
|
||||
* @return true if the collection was modified
|
||||
* @throws NullPointerException if the collection is null
|
||||
|
@ -688,7 +701,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* A function to retain all elements that were provided in the other collection
|
||||
* This function might delegate to a more appropiate function if nessesary
|
||||
* This function might delegate to a more appropriate function if necessary
|
||||
* @param c the elements that should be kept. If empty, ARRAY_LIST#clear is called.
|
||||
* @return true if the collection was modified
|
||||
* @throws NullPointerException if the collection is null
|
||||
|
@ -762,7 +775,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||
|
||||
/**
|
||||
* A function to retain all elements that were provided in the other collection
|
||||
* This function might delegate to a more appropiate function if nessesary
|
||||
* This function might delegate to a more appropriate function if necessary
|
||||
* @param c the elements that should be kept. If empty, ARRAY_LIST#clear is called.
|
||||
* @return true if the collection was modified
|
||||
* @throws NullPointerException if the collection is null
|
||||
|
|
|
@ -46,7 +46,7 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
* @param c the elements that need to be added
|
||||
* @param index index at which the specified elements is to be inserted
|
||||
* @return true if the list was modified
|
||||
* @see java.util.List#addAll(int, Collection)
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
public boolean addAll(int index, COLLECTION KEY_GENERIC_TYPE c);
|
||||
|
||||
|
@ -210,7 +210,7 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
|
||||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#stableSort(KEY_TYPE[], Comparator)
|
||||
*/
|
||||
@Override
|
||||
|
@ -227,7 +227,8 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
|
||||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
||||
* @see List#sort(Comparator)
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#unstableSort(KEY_TYPE[], Comparator)
|
||||
*/
|
||||
public default void unstableSort(Comparator<? super CLASS_TYPE> c) {
|
||||
|
@ -263,7 +264,7 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#stableSort(KEY_TYPE[], COMPARATOR)
|
||||
*/
|
||||
public default void sort(COMPARATOR c) {
|
||||
|
@ -277,8 +278,9 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc}
|
||||
/**
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -289,7 +291,7 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
/**
|
||||
* Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
||||
* @param c the sorter of the elements, can be null
|
||||
* @see List#sort(Comparator)
|
||||
* @see java.util.List#sort(Comparator)
|
||||
* @see ARRAYS#unstableSort(KEY_TYPE[], COMPARATOR)
|
||||
*/
|
||||
public default void unstableSort(COMPARATOR c) {
|
||||
|
@ -306,21 +308,21 @@ public interface LIST KEY_GENERIC_TYPE extends COLLECTION KEY_GENERIC_TYPE, List
|
|||
#endif
|
||||
/**
|
||||
* A Type-Specific Iterator of listIterator
|
||||
* @see List#listIterator
|
||||
* @see java.util.List#listIterator
|
||||
*/
|
||||
@Override
|
||||
public LIST_ITERATOR KEY_GENERIC_TYPE listIterator();
|
||||
|
||||
/**
|
||||
* A Type-Specific Iterator of listIterator
|
||||
* @see List#listIterator(int)
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public LIST_ITERATOR KEY_GENERIC_TYPE listIterator(int index);
|
||||
|
||||
/**
|
||||
* A Type-Specific List of subList
|
||||
* @see List#subList(int, int)
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public LIST KEY_GENERIC_TYPE subList(int from, int to);
|
||||
|
|
|
@ -9,12 +9,14 @@ public interface LIST_ITERATOR KEY_GENERIC_TYPE extends ListIterator<CLASS_TYPE>
|
|||
#if !TYPE_OBJECT
|
||||
/**
|
||||
* A Primitive set function to reduce (un)boxing
|
||||
* @param e the element that should replace the last returned value
|
||||
* @see ListIterator#set(Object)
|
||||
*/
|
||||
public void set(KEY_TYPE e);
|
||||
|
||||
/**
|
||||
* A Primitive set function to reduce (un)boxing
|
||||
* @param e the element that should be inserted before the last returned value
|
||||
* @see ListIterator#set(Object)
|
||||
*/
|
||||
public void add(KEY_TYPE e);
|
||||
|
|
|
@ -374,6 +374,7 @@ public class ARRAYS
|
|||
* Sorts an array according to the natural ascending order using InsertionSort,
|
||||
* @param array the array that needs to be sorted
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
*/
|
||||
public static COMPAREABLE_KEY_BRACES void insertionSort(KEY_TYPE[] array, int from, int to) {
|
||||
for (int i = from+1;i<to; i++) {
|
||||
|
@ -449,6 +450,7 @@ public class ARRAYS
|
|||
* Sorts an array according to the natural ascending order using Selection Sort,
|
||||
* @param array the array that needs to be sorted
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
*/
|
||||
public static COMPAREABLE_KEY_BRACES void selectionSort(KEY_TYPE[] array, int from, int to) {
|
||||
for (int i = from; i < to; i++) {
|
||||
|
@ -491,6 +493,7 @@ public class ARRAYS
|
|||
* Sorts the specified range of elements according to the order induced by the specified comparator using Merge Sort,
|
||||
* This implementation was copied from <a href="https://github.com/vigna/fastutil">FastUtil</a> with a couple custom optimizations
|
||||
* @param array the array that needs to be sorted
|
||||
* @param supp the auxillary array that is used to simplify the sorting
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
* @param comp the Comparator that decides the sorting order
|
||||
|
@ -538,6 +541,7 @@ public class ARRAYS
|
|||
* Sorts an array according to the natural ascending order using Merge Sort,
|
||||
* This implementation was copied from <a href="https://github.com/vigna/fastutil">FastUtil</a> with a couple custom optimizations
|
||||
* @param array the array that needs to be sorted
|
||||
* @param supp the auxillary array that is used to simplify the sorting
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
*/
|
||||
|
@ -588,6 +592,7 @@ public class ARRAYS
|
|||
* Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Merge Sort,
|
||||
* This implementation was copied from <a href="https://github.com/vigna/fastutil">FastUtil</a> with a couple custom optimizations
|
||||
* @param array the array that needs to be sorted
|
||||
* @param supp the auxillary array that is used to simplify the sorting
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
* @param comp the Comparator that decides the sorting order
|
||||
|
@ -626,6 +631,7 @@ public class ARRAYS
|
|||
* Sorts an array according to the natural ascending order using Parallel Merge Sort,
|
||||
* This implementation was copied from <a href="https://github.com/vigna/fastutil">FastUtil</a> with a couple custom optimizations
|
||||
* @param array the array that needs to be sorted
|
||||
* @param supp the auxillary array that is used to simplify the sorting
|
||||
* @param from where the array should be sorted from
|
||||
* @param to where the array should be sorted to
|
||||
* @note This parallelization is invoked through {@link SanityChecks#invokeTask} which the threadpool can be changed as needed
|
||||
|
|
|
@ -35,8 +35,8 @@ public class COLLECTIONS
|
|||
|
||||
/**
|
||||
* Returns a Immutable Collection instance based on the instance given.
|
||||
* @param l that should be made immutable/unmodifyable
|
||||
* @return a unmodifiable collection wrapper. If the Collection already a unmodifyable wrapper then it just returns itself.
|
||||
* @param c that should be made immutable/unmodifiable
|
||||
* @return a unmodifiable collection wrapper. If the Collection already a unmodifiable wrapper then it just returns itself.
|
||||
*/
|
||||
public static GENERIC_KEY_BRACES COLLECTION KEY_GENERIC_TYPE unmodifiableCollection(COLLECTION KEY_GENERIC_TYPE c) {
|
||||
return c instanceof UnmodifiableCollection ? c : new UnmodifiableCollectionBRACES(c);
|
||||
|
@ -44,7 +44,7 @@ public class COLLECTIONS
|
|||
|
||||
/**
|
||||
* Returns a synchronized Collection instance based on the instance given.
|
||||
* @param l that should be synchronized
|
||||
* @param c that should be synchronized
|
||||
* @return a synchronized collection wrapper. If the Collection already a synchronized wrapper then it just returns itself.
|
||||
*/
|
||||
public static GENERIC_KEY_BRACES COLLECTION KEY_GENERIC_TYPE synchronizedCollection(COLLECTION KEY_GENERIC_TYPE c) {
|
||||
|
@ -53,7 +53,7 @@ public class COLLECTIONS
|
|||
|
||||
/**
|
||||
* Returns a synchronized Collection instance based on the instance given.
|
||||
* @param l that should be synchronized
|
||||
* @param c that should be synchronized
|
||||
* @param mutex is the controller of the synchronization block.
|
||||
* @return a synchronized collection wrapper. If the Collection already a synchronized wrapper then it just returns itself.
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,10 @@ import speiger.src.collections.utils.IArray;
|
|||
/**
|
||||
* Type-Specific Helper class to get the underlying array of array implementations.
|
||||
* @see speiger.src.collections.PACKAGE.lists.ARRAY_LIST
|
||||
#if TYPE_OBJECT
|
||||
*
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
#endif
|
||||
*/
|
||||
public interface IARRAY KEY_GENERIC_TYPE extends IArray
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ public class SanityChecks
|
|||
* Internal function that checks if the given array-size is big enough for the access.
|
||||
* @param arraySize the size of the Array
|
||||
* @param offset the offset of the access
|
||||
* @param accessSize the lenght of the access
|
||||
* @param accessSize the length of the access
|
||||
* @throws IllegalStateException if offset or accessSize is negative or the range goes out of the array-size
|
||||
*/
|
||||
public static void checkArrayCapacity(int arraySize, int offset, int accessSize) {
|
||||
|
@ -77,8 +77,8 @@ public class SanityChecks
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns if the current thread-pool can handle multi-threading tasks
|
||||
* @return true if the threadcount is bigger the 1
|
||||
* Returns if the current thread-pool can handle Multi-threading tasks
|
||||
* @return true if the thread-count is bigger the 1
|
||||
*/
|
||||
public static boolean canParallelTask() {
|
||||
return getPool().getParallelism() > 1 || FORCE_IGNORE_PARALLELISM;
|
||||
|
|
|
@ -2,10 +2,11 @@ package speiger.src.collections.utils;
|
|||
|
||||
|
||||
/**
|
||||
* The <pop>Stack<pop> Interface represents the Last-In-First-Out layout (LIFO).
|
||||
* The <pop>Stack</pop> Interface represents the Last-In-First-Out layout (LIFO).
|
||||
* It provides a simple {@link #push(Object)}, {@link #pop()} function,
|
||||
* with a fast {@link #clear()} function.
|
||||
* The {@link #peek(int)} function allows to view the contents of the stack (top to bottom).
|
||||
* @param <T> the type of elements maintained by this Collection
|
||||
*/
|
||||
public interface Stack<T>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue