1 57 58 package com.sun.org.apache.xerces.internal.util; 59 60 69 70 public final class SynchronizedSymbolTable 71 extends SymbolTable { 72 73 77 78 protected SymbolTable fSymbolTable; 79 80 84 85 public SynchronizedSymbolTable(SymbolTable symbolTable) { 86 fSymbolTable = symbolTable; 87 } 89 public SynchronizedSymbolTable() { 91 fSymbolTable = new SymbolTable(); 92 } 94 public SynchronizedSymbolTable(int size) { 96 fSymbolTable = new SymbolTable(size); 97 } 99 103 111 public String addSymbol(String symbol) { 112 113 synchronized (fSymbolTable) { 114 return fSymbolTable.addSymbol(symbol); 115 } 116 117 } 119 129 public String addSymbol(char[] buffer, int offset, int length) { 130 131 synchronized (fSymbolTable) { 132 return fSymbolTable.addSymbol(buffer, offset, length); 133 } 134 135 } 137 143 public boolean containsSymbol(String symbol) { 144 145 synchronized (fSymbolTable) { 146 return fSymbolTable.containsSymbol(symbol); 147 } 148 149 } 151 159 public boolean containsSymbol(char[] buffer, int offset, int length) { 160 161 synchronized (fSymbolTable) { 162 return fSymbolTable.containsSymbol(buffer, offset, length); 163 } 164 165 } 167 } | Popular Tags |