com.alibaba.fastjson.parser
类 SymbolTable

java.lang.Object
  继承者 com.alibaba.fastjson.parser.SymbolTable

public class SymbolTable
extends Object

作者:
wenshao

字段摘要
static int DEFAULT_TABLE_SIZE
           
static int MAX_BUCKET_LENTH
           
static int MAX_SIZE
           
 
构造方法摘要
SymbolTable()
           
SymbolTable(int tableSize)
           
 
方法摘要
 String addSymbol(char[] buffer, int offset, int len)
           
 String addSymbol(char[] buffer, int offset, int len, int hash)
          Adds the specified symbol to the symbol table and returns a reference to the unique symbol.
 String addSymbol(String buffer, int offset, int len, int hash)
           
static int hash(char[] buffer, int offset, int len)
           
 int size()
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_TABLE_SIZE

public static final int DEFAULT_TABLE_SIZE
另请参见:
常量字段值

MAX_BUCKET_LENTH

public static final int MAX_BUCKET_LENTH
另请参见:
常量字段值

MAX_SIZE

public static final int MAX_SIZE
另请参见:
常量字段值
构造方法详细信息

SymbolTable

public SymbolTable()

SymbolTable

public SymbolTable(int tableSize)
方法详细信息

addSymbol

public String addSymbol(char[] buffer,
                        int offset,
                        int len)

addSymbol

public String addSymbol(char[] buffer,
                        int offset,
                        int len,
                        int hash)
Adds the specified symbol to the symbol table and returns a reference to the unique symbol. If the symbol already exists, the previous symbol reference is returned instead, in order guarantee that symbol references remain unique.

参数:
buffer - The buffer containing the new symbol.
offset - The offset into the buffer of the new symbol.
len - The length of the new symbol in the buffer.

addSymbol

public String addSymbol(String buffer,
                        int offset,
                        int len,
                        int hash)

size

public int size()

hash

public static final int hash(char[] buffer,
                             int offset,
                             int len)


Copyright © 2012-2014 Alibaba Group. All Rights Reserved.