org.expasy.jpl.commons.collection.symbol
Class AbstractSymbol<T>
java.lang.Object
org.expasy.jpl.commons.collection.symbol.AbstractSymbol<T>
- Type Parameters:
T - the symbol type.
- All Implemented Interfaces:
- Serializable, Symbol<T>
public abstract class AbstractSymbol<T>
- extends Object
- implements Symbol<T>, Serializable
The basic symbol class.
- Version:
- 1.0
- Author:
- nikitin
- See Also:
- Serialized Form
name
protected char name
- the symbol character
type
protected Symbol.SymbolType<T> type
- the symbol type
AbstractSymbol
public AbstractSymbol()
- for serialization only
AbstractSymbol
protected AbstractSymbol(char name,
Symbol.SymbolType<T> type)
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
getName
public char getName()
-
- Specified by:
getName in interface Symbol<T>
- Returns:
- the symbol name character
getType
public Symbol.SymbolType<T> getType()
-
- Specified by:
getType in interface Symbol<T>
- Returns:
- the symbol type
newSymbolInstance
public static <T> Symbol<T> newSymbolInstance(Class<? extends Symbol<T>> cls,
Symbol.SymbolType<T> type,
char c)
toString
public String toString()
- Overrides:
toString in class Object
Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.