Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 28 29 package com.caucho.relaxng.program; 30 31 import com.caucho.util.L10N; 32 import com.caucho.xml.QName; 33 34 import java.util.HashSet ; 35 36 39 public class DataItem extends Item { 40 protected final static L10N L = new L10N(DataItem.class); 41 42 private String _type; 43 44 public DataItem(String type) 45 { 46 _type = type; 47 } 48 49 52 public void firstSet(HashSet <QName> set) 53 { 54 set.add(new QName("#data", "")); 55 } 56 57 60 public boolean allowEmpty() 61 { 62 return true; 63 } 64 65 68 public Item text(String text) 69 { 70 return this; 71 } 72 73 76 public String toSyntaxDescription(int depth) 77 { 78 return "string"; 79 } 80 81 84 public int hashCode() 85 { 86 return 193 + _type.hashCode(); 87 } 88 89 92 public boolean equals(Object o) 93 { 94 if (this == o) 95 return true; 96 97 if (! (o instanceof DataItem)) 98 return false; 99 100 DataItem item = (DataItem) o; 101 102 return _type.equals(item._type); 103 } 104 105 public String toString() 106 { 107 return "DataItem[]"; 108 } 109 } 110 111
| Popular Tags
|