1 17 18 19 20 package org.apache.fop.hyphenation; 21 22 import java.io.Serializable ; 23 24 36 37 public class Hyphen implements Serializable { 38 public String preBreak; 39 public String noBreak; 40 public String postBreak; 41 42 Hyphen(String pre, String no, String post) { 43 preBreak = pre; 44 noBreak = no; 45 postBreak = post; 46 } 47 48 Hyphen(String pre) { 49 preBreak = pre; 50 noBreak = null; 51 postBreak = null; 52 } 53 54 public String toString() { 55 if (noBreak == null 56 && postBreak == null 57 && preBreak != null 58 && preBreak.equals("-")) { 59 return "-"; 60 } 61 StringBuffer res = new StringBuffer ("{"); 62 res.append(preBreak); 63 res.append("}{"); 64 res.append(postBreak); 65 res.append("}{"); 66 res.append(noBreak); 67 res.append('}'); 68 return res.toString(); 69 } 70 71 } 72 | Popular Tags |