[mkgmap-dev] [PATCH 02/14] Add support to intlist for getting as an array.
From Jeffrey C. Ollie jeff at ocjtech.us on Thu Sep 9 21:12:02 BST 2010
From: Scott Crosby <scrosby at cs.rice.edu> --- src/uk/me/parabola/splitter/IntList.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/uk/me/parabola/splitter/IntList.java b/src/uk/me/parabola/splitter/IntList.java index 9d2b86a..39918a8 100644 --- a/src/uk/me/parabola/splitter/IntList.java +++ b/src/uk/me/parabola/splitter/IntList.java @@ -16,6 +16,10 @@ */ package uk.me.parabola.splitter; +import java.util.Arrays; + +import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.Array; + /** * Maintains a list of int primitives. */ @@ -57,4 +61,9 @@ public class IntList { System.arraycopy(temp, 0, data, 0, size); } } + + /** Get as a read-only array of integers */ + int []asArray() { + return Arrays.copyOf(data,size); + } } \ No newline at end of file -- 1.7.2.3
- Previous message: [mkgmap-dev] [PATCH 01/14] Excise the disk cache code.
- Next message: [mkgmap-dev] [PATCH 03/14] Refactor to pass Nodes as objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list