diff --git a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java index 3f1be8ea..0419671e 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java +++ b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java @@ -1,5 +1,5 @@ // -// $Id: ArrayIntSet.java,v 1.10 2002/12/19 22:41:13 mdb Exp $ +// $Id: ArrayIntSet.java,v 1.11 2003/01/31 02:27:48 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -118,6 +118,19 @@ public class ArrayIntSet extends AbstractSet return values; } + /** + * Serializes this int set into an array at the specified offset. The + * array must be large enough to hold all the integers in our set at + * the offset specified. + * + * @return the array passed in. + */ + public int[] toIntArray (int[] target, int offset) + { + System.arraycopy(_values, 0, target, offset, _size); + return target; + } + // documentation inherited from interface public boolean add (Object o) {