]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/function/edit/FieldEditList.java
Moved source into separate src directory due to popular request
[GpsPrune.git] / src / tim / prune / function / edit / FieldEditList.java
diff --git a/src/tim/prune/function/edit/FieldEditList.java b/src/tim/prune/function/edit/FieldEditList.java
new file mode 100644 (file)
index 0000000..8612e8a
--- /dev/null
@@ -0,0 +1,40 @@
+package tim.prune.function.edit;
+
+import java.util.ArrayList;
+
+/**
+ * Class to hold a list of field edits
+ */
+public class FieldEditList
+{
+       private ArrayList<FieldEdit> _editList = new ArrayList<FieldEdit>();
+
+
+       /**
+        * 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 _editList.get(inIndex);
+       }
+}