Changeset 1760 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java
- Timestamp:
- 09/23/14 13:55:37 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java
r1747 r1760 4 4 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 5 5 6 import java.io.Serializable;7 import java.util.ArrayList;8 6 import java.util.Iterator; 9 7 import java.util.LinkedList; … … 13 11 * The Class Match. 14 12 */ 15 public class Match implements Cloneable,Comparable<Match>,Serializable { 16 17 /** The Constant serialVersionUID. */ 18 private static final long serialVersionUID = -3206992723755714741L; 13 public class Match { 19 14 20 15 /** The matchseqs. */ 21 private final ArrayList<NumberSequence>matchseqs;16 private final NumberSequence[] matchseqs; 22 17 23 18 /** The occurences. */ … … 28 23 */ 29 24 public Match() { 30 matchseqs = new ArrayList<NumberSequence>(2);25 matchseqs = new NumberSequence[2]; 31 26 occurrences = new LinkedList<MatchOccurrence>(); 32 matchseqs.add(null); 33 matchseqs.add(null); 34 } // TODO Auto-generated method stub 27 28 } 35 29 36 30 /** 37 * Adds the occur ence.31 * Adds the occurrence. 38 32 * 39 * @param occurence the occur ence33 * @param occurence the occurrence 40 34 */ 41 35 public void addOccurence(MatchOccurrence occurence) { … … 74 68 */ 75 69 public NumberSequence getFirstSequence() { 76 return matchseqs .get(0);70 return matchseqs[0]; 77 71 } 78 72 … … 92 86 */ 93 87 public NumberSequence getSecondSequence() { 94 return matchseqs .get(1);88 return matchseqs[1]; 95 89 } 96 90 … … 110 104 */ 111 105 public void setFirstSequence(NumberSequence seq) { 112 matchseqs .set(0, seq);106 matchseqs[0] = seq; 113 107 } 114 108 … … 128 122 */ 129 123 public void setSecondSequence(NumberSequence seq) { 130 matchseqs .set(1, seq);124 matchseqs[1] = seq; 131 125 } 132 126 … … 169 163 * @throws CloneNotSupportedException the clone not supported exception 170 164 */ 165 /* 171 166 public Match cloneWithoutOccurrences() { 172 167 Match result = new Match(); … … 174 169 result.setSecondSequence(this.getSecondSequence()); 175 170 return result; 176 } 171 }*/ 177 172 178 179 173 180 174 /** 181 175 * Size. … … 185 179 public int size() { 186 180 // Both sequences should be equally long 187 return matchseqs .get(0).size();181 return matchseqs[0].size(); 188 182 } 189 190 /* (non-Javadoc)191 * @see java.lang.Comparable#compareTo(java.lang.Object)192 */193 @Override194 public int compareTo(Match arg0) {195 196 return 0;197 }198 199 183 }
Note: See TracChangeset
for help on using the changeset viewer.