1 16 17 package com.lowagie.text.pdf.hyphenation; 18 19 import java.io.Serializable ; 20 21 33 34 public class Hyphen implements Serializable { 35 private static final long serialVersionUID = -7666138517324763063L; 36 public String preBreak; 37 public String noBreak; 38 public String postBreak; 39 40 Hyphen(String pre, String no, String post) { 41 preBreak = pre; 42 noBreak = no; 43 postBreak = post; 44 } 45 46 Hyphen(String pre) { 47 preBreak = pre; 48 noBreak = null; 49 postBreak = null; 50 } 51 52 public String toString() { 53 if (noBreak == null 54 && postBreak == null 55 && preBreak != null 56 && preBreak.equals("-")) { 57 return "-"; 58 } 59 StringBuffer res = new StringBuffer ("{"); 60 res.append(preBreak); 61 res.append("}{"); 62 res.append(postBreak); 63 res.append("}{"); 64 res.append(noBreak); 65 res.append('}'); 66 return res.toString(); 67 } 68 69 } 70 | Popular Tags |