]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/edit/FieldEditList.java
Version 2, March 2007
[GpsPrune.git] / tim / prune / edit / FieldEditList.java
diff --git a/tim/prune/edit/FieldEditList.java b/tim/prune/edit/FieldEditList.java
new file mode 100644 (file)
index 0000000..70bd263
--- /dev/null
@@ -0,0 +1,40 @@
+package tim.prune.edit;
+
+import java.util.ArrayList;
+
+/**
+ * Class to hold a list of field edits
+ */
+public class FieldEditList
+{
+       private ArrayList _editList = new ArrayList();
+
+
+       /**
+        * Add an edit to the list
+        * @param inEdit FieldEdit
+        */
+       public void addEdit(FieldEdit inEdit)
+       {
+               if (inEdit != null)
+                       _editList.add(inEdit);
+       }
+
+       /**
+        * @return number of edits in list
+        */
+       public int getNumEdits()
+       {
+               return _editList.size();
+       }
+
+       /**
+        * Get the edit at the specified index
+        * @param inIndex index to get, starting at 0
+        * @return FieldEdit
+        */
+       public FieldEdit getEdit(int inIndex)
+       {
+               return (FieldEdit) _editList.get(inIndex);
+       }
+}