mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-09 11:35:28 +00:00
* allow zero as an initial capacity for the primitive array lists (once again). (java.util.ArrayList allows it, why shouldn't we?)
* add tests to enforce the contract git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
034ec419ea
commit
a47d25a4ff
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/FloatArrayList.java,v 1.4 2002/08/23 17:31:28 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/FloatArrayList.java,v 1.5 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.4 $
|
* $Revision: 1.5 $
|
||||||
* $Date: 2002/08/23 17:31:28 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -78,7 +78,7 @@ import java.util.ListIterator;
|
|||||||
* {@link java.util.ArrayList} of {@link Float} values and allows for
|
* {@link java.util.ArrayList} of {@link Float} values and allows for
|
||||||
* better compile-time type checking.<P>
|
* better compile-time type checking.<P>
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.4 $ $Date: 2002/08/23 17:31:28 $
|
* @version $Revision: 1.5 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class FloatArrayList extends AbstractList implements List, Serializable {
|
public class FloatArrayList extends AbstractList implements List, Serializable {
|
||||||
@ -98,11 +98,10 @@ public class FloatArrayList extends AbstractList implements List, Serializable {
|
|||||||
* capacity.
|
* capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the initial capacity for the list
|
* @param capacity the initial capacity for the list
|
||||||
* @throws IllegalArgumentException if capacity is less than or equal
|
* @throws IllegalArgumentException if capacity is less than zero
|
||||||
* to zero
|
|
||||||
*/
|
*/
|
||||||
public FloatArrayList(int capacity) {
|
public FloatArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new float[capacity];
|
_data = new float[capacity];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -78,7 +78,7 @@ import java.util.ListIterator;
|
|||||||
* {@link java.util.ArrayList} of {@link Integer} values and allows for
|
* {@link java.util.ArrayList} of {@link Integer} values and allows for
|
||||||
* better compile-time type checking.<P>
|
* better compile-time type checking.<P>
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class IntArrayList extends AbstractIntArrayList implements Serializable {
|
public class IntArrayList extends AbstractIntArrayList implements Serializable {
|
||||||
@ -96,11 +96,10 @@ public class IntArrayList extends AbstractIntArrayList implements Serializable {
|
|||||||
* Constructs a new <Code>IntArrayList</Code> with the given capacity.
|
* Constructs a new <Code>IntArrayList</Code> with the given capacity.
|
||||||
*
|
*
|
||||||
* @param the capacity for the list
|
* @param the capacity for the list
|
||||||
* @throws IllegalArgumentException if the capacity is less than or
|
* @throws IllegalArgumentException if the capacity is less than zero
|
||||||
* equal to zero
|
|
||||||
*/
|
*/
|
||||||
public IntArrayList(int capacity) {
|
public IntArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity " + capacity);
|
throw new IllegalArgumentException("capacity " + capacity);
|
||||||
}
|
}
|
||||||
_data = new int[capacity];
|
_data = new int[capacity];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/LongArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/LongArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -78,7 +78,7 @@ import java.util.ListIterator;
|
|||||||
* {@link java.util.ArrayList} of {@link Long} values and allows for
|
* {@link java.util.ArrayList} of {@link Long} values and allows for
|
||||||
* better compile-time type checking.<P>
|
* better compile-time type checking.<P>
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class LongArrayList extends AbstractLongArrayList implements Serializable {
|
public class LongArrayList extends AbstractLongArrayList implements Serializable {
|
||||||
@ -98,11 +98,10 @@ public class LongArrayList extends AbstractLongArrayList implements Serializable
|
|||||||
* capacity.
|
* capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the initial capacity for the array
|
* @param capacity the initial capacity for the array
|
||||||
* @throws IllegalArgumentException if the capacity is less than or
|
* @throws IllegalArgumentException if the capacity is less than zero
|
||||||
* equal to zero
|
|
||||||
*/
|
*/
|
||||||
public LongArrayList(int capacity) {
|
public LongArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new long[capacity];
|
_data = new long[capacity];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ShortArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ShortArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -78,7 +78,7 @@ import java.util.ListIterator;
|
|||||||
* {@link java.util.ArrayList} of {@link Short} values and allows for
|
* {@link java.util.ArrayList} of {@link Short} values and allows for
|
||||||
* better compile-time type checking.<P>
|
* better compile-time type checking.<P>
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class ShortArrayList extends AbstractShortArrayList implements Serializable {
|
public class ShortArrayList extends AbstractShortArrayList implements Serializable {
|
||||||
@ -98,11 +98,10 @@ public class ShortArrayList extends AbstractShortArrayList implements Serializab
|
|||||||
* capacity.
|
* capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the initial capacity for the array
|
* @param capacity the initial capacity for the array
|
||||||
* @throws IllegalArgumentException if the capacity is less than or
|
* @throws IllegalArgumentException if the capacity is less than zero
|
||||||
* equal to zero
|
|
||||||
*/
|
*/
|
||||||
public ShortArrayList(int capacity) {
|
public ShortArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new short[capacity];
|
_data = new short[capacity];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedByteArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedByteArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -80,7 +80,7 @@ import java.util.ListIterator;
|
|||||||
* than a {@link java.util.ArrayList} and offers better compile-time type
|
* than a {@link java.util.ArrayList} and offers better compile-time type
|
||||||
* checking.
|
* checking.
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class UnsignedByteArrayList extends AbstractShortArrayList implements Serializable {
|
public class UnsignedByteArrayList extends AbstractShortArrayList implements Serializable {
|
||||||
@ -100,11 +100,10 @@ public class UnsignedByteArrayList extends AbstractShortArrayList implements Ser
|
|||||||
* specified initial capacity.
|
* specified initial capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the capacity for this list
|
* @param capacity the capacity for this list
|
||||||
* @throws IllegalArgumentException if the given capacity is less than
|
* @throws IllegalArgumentException if the given capacity is less than zero
|
||||||
* or equal to zero
|
|
||||||
*/
|
*/
|
||||||
public UnsignedByteArrayList(int capacity) {
|
public UnsignedByteArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new byte[capacity];
|
_data = new byte[capacity];
|
||||||
@ -174,26 +173,26 @@ public class UnsignedByteArrayList extends AbstractShortArrayList implements Ser
|
|||||||
checkRangeIncludingEndpoint(index);
|
checkRangeIncludingEndpoint(index);
|
||||||
ensureCapacity(_size+1);
|
ensureCapacity(_size+1);
|
||||||
int numtomove = _size-index;
|
int numtomove = _size-index;
|
||||||
System.arraycopy(_data,index,_data,index+1,numtomove);
|
System.arraycopy(_data,index,_data,index+1,numtomove);
|
||||||
_data[index] = fromShort(value);
|
_data[index] = fromShort(value);
|
||||||
_size++;
|
_size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
modCount++;
|
modCount++;
|
||||||
_size = 0;
|
_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short removeShortAt(int index) {
|
public short removeShortAt(int index) {
|
||||||
checkRange(index);
|
checkRange(index);
|
||||||
modCount++;
|
modCount++;
|
||||||
short oldval = toShort(_data[index]);
|
short oldval = toShort(_data[index]);
|
||||||
int numtomove = _size - index - 1;
|
int numtomove = _size - index - 1;
|
||||||
if(numtomove > 0) {
|
if(numtomove > 0) {
|
||||||
System.arraycopy(_data,index+1,_data,index,numtomove);
|
System.arraycopy(_data,index+1,_data,index,numtomove);
|
||||||
}
|
}
|
||||||
_size--;
|
_size--;
|
||||||
return oldval;
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeShort(short value) {
|
public boolean removeShort(short value) {
|
||||||
@ -208,22 +207,22 @@ public class UnsignedByteArrayList extends AbstractShortArrayList implements Ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ensureCapacity(int mincap) {
|
public void ensureCapacity(int mincap) {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(mincap > _data.length) {
|
if(mincap > _data.length) {
|
||||||
int newcap = (_data.length * 3)/2 + 1;
|
int newcap = (_data.length * 3)/2 + 1;
|
||||||
byte[] olddata = _data;
|
byte[] olddata = _data;
|
||||||
_data = new byte[newcap < mincap ? mincap : newcap];
|
_data = new byte[newcap < mincap ? mincap : newcap];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void trimToSize() {
|
public void trimToSize() {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(_size < _data.length) {
|
if(_size < _data.length) {
|
||||||
byte[] olddata = _data;
|
byte[] olddata = _data;
|
||||||
_data = new byte[_size];
|
_data = new byte[_size];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
@ -246,17 +245,17 @@ public class UnsignedByteArrayList extends AbstractShortArrayList implements Ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void writeObject(ObjectOutputStream out) throws IOException{
|
private void writeObject(ObjectOutputStream out) throws IOException{
|
||||||
out.defaultWriteObject();
|
out.defaultWriteObject();
|
||||||
out.writeInt(_data.length);
|
out.writeInt(_data.length);
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
out.writeByte(_data[i]);
|
out.writeByte(_data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
_data = new byte[in.readInt()];
|
_data = new byte[in.readInt()];
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
_data[i] = in.readByte();
|
_data[i] = in.readByte();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedIntArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedIntArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -80,7 +80,7 @@ import java.util.ListIterator;
|
|||||||
* than a {@link java.util.ArrayList} and offers better compile-time type
|
* than a {@link java.util.ArrayList} and offers better compile-time type
|
||||||
* checking.
|
* checking.
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class UnsignedIntArrayList extends AbstractLongArrayList implements Serializable {
|
public class UnsignedIntArrayList extends AbstractLongArrayList implements Serializable {
|
||||||
@ -100,11 +100,10 @@ public class UnsignedIntArrayList extends AbstractLongArrayList implements Seria
|
|||||||
* specified initial capacity.
|
* specified initial capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the capacity for this list
|
* @param capacity the capacity for this list
|
||||||
* @throws IllegalArgumentException if the given capacity is less than
|
* @throws IllegalArgumentException if the given capacity is less than zero
|
||||||
* or equal to zero
|
|
||||||
*/
|
*/
|
||||||
public UnsignedIntArrayList(int capacity) {
|
public UnsignedIntArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new int[capacity];
|
_data = new int[capacity];
|
||||||
@ -174,26 +173,26 @@ public class UnsignedIntArrayList extends AbstractLongArrayList implements Seria
|
|||||||
checkRangeIncludingEndpoint(index);
|
checkRangeIncludingEndpoint(index);
|
||||||
ensureCapacity(_size+1);
|
ensureCapacity(_size+1);
|
||||||
int numtomove = _size-index;
|
int numtomove = _size-index;
|
||||||
System.arraycopy(_data,index,_data,index+1,numtomove);
|
System.arraycopy(_data,index,_data,index+1,numtomove);
|
||||||
_data[index] = fromLong(value);
|
_data[index] = fromLong(value);
|
||||||
_size++;
|
_size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
modCount++;
|
modCount++;
|
||||||
_size = 0;
|
_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long removeLongAt(int index) {
|
public long removeLongAt(int index) {
|
||||||
checkRange(index);
|
checkRange(index);
|
||||||
modCount++;
|
modCount++;
|
||||||
long oldval = toLong(_data[index]);
|
long oldval = toLong(_data[index]);
|
||||||
int numtomove = _size - index - 1;
|
int numtomove = _size - index - 1;
|
||||||
if(numtomove > 0) {
|
if(numtomove > 0) {
|
||||||
System.arraycopy(_data,index+1,_data,index,numtomove);
|
System.arraycopy(_data,index+1,_data,index,numtomove);
|
||||||
}
|
}
|
||||||
_size--;
|
_size--;
|
||||||
return oldval;
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeLong(long value) {
|
public boolean removeLong(long value) {
|
||||||
@ -208,22 +207,22 @@ public class UnsignedIntArrayList extends AbstractLongArrayList implements Seria
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ensureCapacity(int mincap) {
|
public void ensureCapacity(int mincap) {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(mincap > _data.length) {
|
if(mincap > _data.length) {
|
||||||
int newcap = (_data.length * 3)/2 + 1;
|
int newcap = (_data.length * 3)/2 + 1;
|
||||||
int[] olddata = _data;
|
int[] olddata = _data;
|
||||||
_data = new int[newcap < mincap ? mincap : newcap];
|
_data = new int[newcap < mincap ? mincap : newcap];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void trimToSize() {
|
public void trimToSize() {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(_size < _data.length) {
|
if(_size < _data.length) {
|
||||||
int[] olddata = _data;
|
int[] olddata = _data;
|
||||||
_data = new int[_size];
|
_data = new int[_size];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
@ -245,17 +244,17 @@ public class UnsignedIntArrayList extends AbstractLongArrayList implements Seria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void writeObject(ObjectOutputStream out) throws IOException{
|
private void writeObject(ObjectOutputStream out) throws IOException{
|
||||||
out.defaultWriteObject();
|
out.defaultWriteObject();
|
||||||
out.writeInt(_data.length);
|
out.writeInt(_data.length);
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
out.writeInt(_data[i]);
|
out.writeInt(_data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
_data = new int[in.readInt()];
|
_data = new int[in.readInt()];
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
_data[i] = in.readInt();
|
_data[i] = in.readInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedShortArrayList.java,v 1.5 2002/08/22 01:50:54 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedShortArrayList.java,v 1.6 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2002/08/22 01:50:54 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -80,7 +80,7 @@ import java.util.ListIterator;
|
|||||||
* than a {@link java.util.ArrayList} and offers better compile-time type
|
* than a {@link java.util.ArrayList} and offers better compile-time type
|
||||||
* checking.
|
* checking.
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.5 $ $Date: 2002/08/22 01:50:54 $
|
* @version $Revision: 1.6 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class UnsignedShortArrayList extends AbstractIntArrayList implements Serializable {
|
public class UnsignedShortArrayList extends AbstractIntArrayList implements Serializable {
|
||||||
@ -101,11 +101,10 @@ public class UnsignedShortArrayList extends AbstractIntArrayList implements Seri
|
|||||||
* specified initial capacity.
|
* specified initial capacity.
|
||||||
*
|
*
|
||||||
* @param capacity the capacity for this list
|
* @param capacity the capacity for this list
|
||||||
* @throws IllegalArgumentException if the given capacity is less than
|
* @throws IllegalArgumentException if the given capacity is less than zero
|
||||||
* or equal to zero
|
|
||||||
*/
|
*/
|
||||||
public UnsignedShortArrayList(int capacity) {
|
public UnsignedShortArrayList(int capacity) {
|
||||||
if (capacity <= 0) {
|
if (capacity < 0) {
|
||||||
throw new IllegalArgumentException("capacity=" + capacity);
|
throw new IllegalArgumentException("capacity=" + capacity);
|
||||||
}
|
}
|
||||||
_data = new short[capacity];
|
_data = new short[capacity];
|
||||||
@ -175,26 +174,26 @@ public class UnsignedShortArrayList extends AbstractIntArrayList implements Seri
|
|||||||
checkRangeIncludingEndpoint(index);
|
checkRangeIncludingEndpoint(index);
|
||||||
ensureCapacity(_size+1);
|
ensureCapacity(_size+1);
|
||||||
int numtomove = _size-index;
|
int numtomove = _size-index;
|
||||||
System.arraycopy(_data,index,_data,index+1,numtomove);
|
System.arraycopy(_data,index,_data,index+1,numtomove);
|
||||||
_data[index] = fromInt(value);
|
_data[index] = fromInt(value);
|
||||||
_size++;
|
_size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
modCount++;
|
modCount++;
|
||||||
_size = 0;
|
_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int removeIntAt(int index) {
|
public int removeIntAt(int index) {
|
||||||
checkRange(index);
|
checkRange(index);
|
||||||
modCount++;
|
modCount++;
|
||||||
int oldval = toInt(_data[index]);
|
int oldval = toInt(_data[index]);
|
||||||
int numtomove = _size - index - 1;
|
int numtomove = _size - index - 1;
|
||||||
if(numtomove > 0) {
|
if(numtomove > 0) {
|
||||||
System.arraycopy(_data,index+1,_data,index,numtomove);
|
System.arraycopy(_data,index+1,_data,index,numtomove);
|
||||||
}
|
}
|
||||||
_size--;
|
_size--;
|
||||||
return oldval;
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeInt(int value) {
|
public boolean removeInt(int value) {
|
||||||
@ -209,22 +208,22 @@ public class UnsignedShortArrayList extends AbstractIntArrayList implements Seri
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ensureCapacity(int mincap) {
|
public void ensureCapacity(int mincap) {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(mincap > _data.length) {
|
if(mincap > _data.length) {
|
||||||
int newcap = (_data.length * 3)/2 + 1;
|
int newcap = (_data.length * 3)/2 + 1;
|
||||||
short[] olddata = _data;
|
short[] olddata = _data;
|
||||||
_data = new short[newcap < mincap ? mincap : newcap];
|
_data = new short[newcap < mincap ? mincap : newcap];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void trimToSize() {
|
public void trimToSize() {
|
||||||
modCount++;
|
modCount++;
|
||||||
if(_size < _data.length) {
|
if(_size < _data.length) {
|
||||||
short[] olddata = _data;
|
short[] olddata = _data;
|
||||||
_data = new short[_size];
|
_data = new short[_size];
|
||||||
System.arraycopy(olddata,0,_data,0,_size);
|
System.arraycopy(olddata,0,_data,0,_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
@ -247,17 +246,17 @@ public class UnsignedShortArrayList extends AbstractIntArrayList implements Seri
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void writeObject(ObjectOutputStream out) throws IOException{
|
private void writeObject(ObjectOutputStream out) throws IOException{
|
||||||
out.defaultWriteObject();
|
out.defaultWriteObject();
|
||||||
out.writeInt(_data.length);
|
out.writeInt(_data.length);
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
out.writeShort(_data[i]);
|
out.writeShort(_data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
_data = new short[in.readInt()];
|
_data = new short[in.readInt()];
|
||||||
for(int i=0;i<_size;i++) {
|
for(int i=0;i<_size;i++) {
|
||||||
_data[i] = in.readShort();
|
_data[i] = in.readShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestFloatArrayList.java,v 1.2 2002/06/21 04:01:31 mas Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestFloatArrayList.java,v 1.3 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
* $Date: 2002/06/21 04:01:31 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -68,7 +68,7 @@ import org.apache.commons.collections.TestList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.2 $ $Date: 2002/06/21 04:01:31 $
|
* @version $Revision: 1.3 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestFloatArrayList extends TestList {
|
public class TestFloatArrayList extends TestList {
|
||||||
@ -98,6 +98,10 @@ public class TestFloatArrayList extends TestList {
|
|||||||
|
|
||||||
//------------------------------------------------------------------- Tests
|
//------------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
FloatArrayList list = new FloatArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
public void testAddGet() {
|
public void testAddGet() {
|
||||||
FloatArrayList list = createList();
|
FloatArrayList list = createList();
|
||||||
for(float i=0F;i<1000F;i++) {
|
for(float i=0F;i<1000F;i++) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestIntArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestIntArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestIntArrayList extends TestAbstractIntArrayList {
|
public class TestIntArrayList extends TestAbstractIntArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestIntArrayList extends TestAbstractIntArrayList {
|
|||||||
return new IntArrayList();
|
return new IntArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
IntArrayList list = new IntArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestLongArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestLongArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestLongArrayList extends TestAbstractLongArrayList {
|
public class TestLongArrayList extends TestAbstractLongArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestLongArrayList extends TestAbstractLongArrayList {
|
|||||||
return new LongArrayList();
|
return new LongArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
LongArrayList list = new LongArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestShortArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestShortArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestShortArrayList extends TestAbstractShortArrayList {
|
public class TestShortArrayList extends TestAbstractShortArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestShortArrayList extends TestAbstractShortArrayList {
|
|||||||
return new ShortArrayList();
|
return new ShortArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
ShortArrayList list = new ShortArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedByteArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedByteArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestUnsignedByteArrayList extends TestAbstractShortArrayList {
|
public class TestUnsignedByteArrayList extends TestAbstractShortArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestUnsignedByteArrayList extends TestAbstractShortArrayList {
|
|||||||
return new UnsignedByteArrayList();
|
return new UnsignedByteArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
UnsignedByteArrayList list = new UnsignedByteArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedIntArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedIntArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestUnsignedIntArrayList extends TestAbstractLongArrayList {
|
public class TestUnsignedIntArrayList extends TestAbstractLongArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestUnsignedIntArrayList extends TestAbstractLongArrayList {
|
|||||||
return new UnsignedIntArrayList();
|
return new UnsignedIntArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
UnsignedIntArrayList list = new UnsignedIntArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedShortArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedShortArrayList.java,v 1.4 2002/09/07 20:33:32 rwaldhoff Exp $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2002/08/19 21:19:03 $
|
* $Date: 2002/09/07 20:33:32 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
@ -67,7 +67,7 @@ import junit.framework.TestSuite;
|
|||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $ $Date: 2002/08/19 21:19:03 $
|
* @version $Revision: 1.4 $ $Date: 2002/09/07 20:33:32 $
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
*/
|
*/
|
||||||
public class TestUnsignedShortArrayList extends TestAbstractIntArrayList {
|
public class TestUnsignedShortArrayList extends TestAbstractIntArrayList {
|
||||||
@ -89,5 +89,11 @@ public class TestUnsignedShortArrayList extends TestAbstractIntArrayList {
|
|||||||
return new UnsignedShortArrayList();
|
return new UnsignedShortArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------- Tests
|
||||||
|
|
||||||
|
public void testZeroInitialCapacityIsValid() {
|
||||||
|
UnsignedShortArrayList list = new UnsignedShortArrayList(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user