Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.henry.dataapi;
- import java.util.ArrayList;
- /**
- * <h1><b>DataFile</b></h1>
- * The DataFileList class lets you create lists that can be saved to files
- *
- * @author Skionz
- */
- public class DataList {
- private ArrayList<String> list;
- public DataList() {
- this.list = new ArrayList<String>();
- }
- public void add(String toAdd) {
- this.list.add(toAdd);
- }
- public void remove(String toRemove) {
- this.list.remove(toRemove);
- }
- public void clear() {
- this.list.clear();
- }
- public String toString() {
- String string = "";
- for(int count = 0; count <= this.list.size() - 1; count++) {
- String value = this.list.get(count);
- if(count == 0) {
- string += value;
- }
- else {
- string += "," + value;
- }
- }
- return string;
- }
- public ArrayList<String> toArrayList() {
- return this.list;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement