1 11 package org.eclipse.jdt.internal.debug.ui; 12 13 14 17 public class DetailFormatter implements Comparable { 18 19 private boolean fEnabled; 20 21 private String fTypeName; 22 23 private String fSnippet; 24 25 public DetailFormatter(String typeName, String snippet, boolean enabled) { 26 fTypeName= typeName; 27 fSnippet= snippet; 28 fEnabled= enabled; 29 } 30 31 35 public boolean isEnabled() { 36 return fEnabled; 37 } 38 39 43 public String getSnippet() { 44 return fSnippet; 45 } 46 47 51 public String getTypeName() { 52 return fTypeName; 53 } 54 55 59 public void setEnabled(boolean enabled) { 60 fEnabled= enabled; 61 } 62 63 67 public void setSnippet(String snippet) { 68 fSnippet= snippet; 69 } 70 71 75 public void setTypeName(String typeName) { 76 fTypeName= typeName; 77 } 78 79 82 public int compareTo(Object another) { 83 DetailFormatter detailFormatter= (DetailFormatter)another; 84 if (fTypeName == null) { 85 if (detailFormatter.fTypeName == null) { 86 return 0; 87 } 88 return detailFormatter.fTypeName.compareTo(fTypeName); 89 } 90 return fTypeName.compareTo(detailFormatter.fTypeName); 91 } 92 93 } 94 | Popular Tags |