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 EmptyItem extends Item { 40 protected final static L10N L = new L10N(EmptyItem.class); 41 42 private static final EmptyItem EMPTY = new EmptyItem(); 43 44 47 public static EmptyItem create() 48 { 49 return EMPTY; 50 } 51 52 55 public void firstSet(HashSet <QName> set) 56 { 57 } 58 59 62 public boolean allowEmpty() 63 { 64 return true; 65 } 66 67 75 public Item setAttribute(QName name, String value) 76 { 77 return this; 78 } 79 80 83 public String toSyntaxDescription(int depth) 84 { 85 return "empty"; 86 } 87 88 91 public boolean isSimpleSyntax() 92 { 93 return true; 94 } 95 96 99 public int hashCode() 100 { 101 return 37; 102 } 103 104 107 public boolean equals(Object o) 108 { 109 return o instanceof EmptyItem; 110 } 111 112 public String toString() 113 { 114 return "EmptyItem[]"; 115 } 116 } 117 | Popular Tags |