Changeset 504 for trunk/src/org/expeditee/io
- Timestamp:
- 11/19/13 12:01:52 (11 years ago)
- Location:
- trunk/src/org/expeditee/io
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/io/ExpReader.java
r427 r504 46 46 * @return true if s begins with a tag 47 47 */ 48 pr ivatestatic boolean isValidLine(String s) {48 protected static boolean isValidLine(String s) { 49 49 return s.length() >= 2 && s.charAt(1) == ' ' 50 50 && Character.isLetter(s.charAt(0)); … … 184 184 * The line of text read in from the file to process. 185 185 */ 186 pr ivatevoid processBodyLine(Item item, String line) {186 protected void processBodyLine(Item item, String line) { 187 187 // separate the tag from the value 188 188 Character tag = getTag(line); … … 203 203 } 204 204 205 pr ivatestatic Character getTag(String line) {205 protected static Character getTag(String line) { 206 206 assert (line.length() > 0); 207 207 return line.charAt(0); 208 208 } 209 209 210 pr ivatestatic String getValue(String line) {210 protected static String getValue(String line) { 211 211 if (line.length() > 2) 212 212 return line.substring(2); … … 250 250 251 251 // Returns a point from a String containing two ints separated by a space 252 pr ivatejava.awt.Point separateValues(String line) {252 protected java.awt.Point separateValues(String line) { 253 253 int x = Integer.parseInt(line.substring(0, line.indexOf(" "))); 254 254 int y = Integer.parseInt(line.substring(line.indexOf(" ") + 1)); -
trunk/src/org/expeditee/io/ExpWriter.java
r362 r504 31 31 private ProxyWriter _writer = null; 32 32 33 pr ivateStringBuilder _stringWriter = null;33 protected StringBuilder _stringWriter = null; 34 34 35 35 private static final char TERMINATOR = 'Z'; … … 130 130 } 131 131 132 pr ivatevoid writeTerminator() throws IOException {132 protected void writeTerminator() throws IOException { 133 133 writeLine(TERMINATOR + "\n"); 134 134 } 135 135 136 136 // writes the given line out to the file 137 pr ivatevoid writeLine(String line) throws IOException {137 protected void writeLine(String line) throws IOException { 138 138 // do not write empty lines 139 139 if (line == null) … … 152 152 return; 153 153 154 writeItemAlways(item); 155 } 156 157 protected void writeItemAlways(Item item) throws IOException { 154 158 if (item.isLineEnd()) 155 159 writeLineEnd(item); … … 173 177 174 178 // writes out all lines to the file 175 pr ivatevoid writeLineData() throws IOException {179 protected void writeLineData() throws IOException { 176 180 List<Line> seen = new LinkedList<Line>(); 177 181 … … 206 210 207 211 // writes out any constraints to the file 208 pr ivatevoid writeConstraintData() throws IOException {212 protected void writeConstraintData() throws IOException { 209 213 // outputs any constraints the points have 210 214
Note:
See TracChangeset
for help on using the changeset viewer.