00001 package CodingUtils; 00002 00003 import java.util.ArrayList; 00004 00005 public class CodedFile { 00006 00007 private ArrayList<String> codewoorden; 00008 public CodedFile(int geschattelengte) { 00009 codewoorden = new ArrayList<String>(geschattelengte); 00010 } 00011 public void storeOffset(String n){ 00012 this.addString(""+n); 00013 } 00014 00015 public void storeVerticalOffset(String v) 00016 { 00017 this.addString(""+v); 00018 } 00019 00020 public void storeTesselation(String tes){ 00021 this.addString(tes); 00022 } 00023 00024 protected void addString(String string){ 00025 this.codewoorden.add(string); 00026 } 00027 00028 public ArrayList<String> getCodeWoorden(){ 00029 return codewoorden; 00030 } 00031 00032 public void addString(String string, String tag){ 00033 addString(string); 00034 } 00035 00036 public boolean hasSameContent(CodedFile codedFile){ 00037 System.out.print("lengte deze file = " + this.codewoorden.size()); 00038 Debug.print(" lengte andere file = "+ codedFile.getCodeWoorden().size()); 00039 boolean thesame=true; 00040 for(int i=0;i!=Math.min(this.codewoorden.size(),codedFile.getCodeWoorden().size());i++){ 00041 if(!codedFile.getCodeWoorden().get(i).equalsIgnoreCase(this.codewoorden.get(i))){ 00042 Debug.print("verschillend op locatie " +i+ " andere file: "+codedFile.getCodeWoorden().get(i)); 00043 Debug.print(" ; deze file: "+ this.codewoorden.get(i)); 00044 thesame=false; 00045 } 00046 } 00047 return thesame; 00048 } 00049 00050 public void print(){ 00051 for(String s: codewoorden){ 00052 Debug.print(s); 00053 } 00054 00055 } 00056 00057 }
1.5.5