1 16 17 package org.apache.xerces.util; 18 19 28 29 public final class SynchronizedSymbolTable 30 extends SymbolTable { 31 32 36 37 protected SymbolTable fSymbolTable; 38 39 43 44 public SynchronizedSymbolTable(SymbolTable symbolTable) { 45 fSymbolTable = symbolTable; 46 } 48 public SynchronizedSymbolTable() { 50 fSymbolTable = new SymbolTable(); 51 } 53 public SynchronizedSymbolTable(int size) { 55 fSymbolTable = new SymbolTable(size); 56 } 58 62 70 public String addSymbol(String symbol) { 71 72 synchronized (fSymbolTable) { 73 return fSymbolTable.addSymbol(symbol); 74 } 75 76 } 78 88 public String addSymbol(char[] buffer, int offset, int length) { 89 90 synchronized (fSymbolTable) { 91 return fSymbolTable.addSymbol(buffer, offset, length); 92 } 93 94 } 96 102 public boolean containsSymbol(String symbol) { 103 104 synchronized (fSymbolTable) { 105 return fSymbolTable.containsSymbol(symbol); 106 } 107 108 } 110 118 public boolean containsSymbol(char[] buffer, int offset, int length) { 119 120 synchronized (fSymbolTable) { 121 return fSymbolTable.containsSymbol(buffer, offset, length); 122 } 123 124 } 126 } | Popular Tags |