Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.symbol
Interface ISymbolSet

All Superinterfaces:
IPersistable

public interface ISymbolSet
extends IPersistable

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the MTJ team.

Since:
1.0
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 void add(Collection<ISymbol> c)
          Add a collection of symbols to this symbol set
 void add(ISymbol s)
          Add one specific symbol to this symbol set
 ISymbol add(String identifier)
          Define the specified identifier.
 ISymbol add(String identifier, String value)
          Define the specified identifier to be the specified value.
 ISymbol add(String identifier, String value, int type)
          Define the specified identifier to be the specified value.
 boolean contains(String identifier)
          Return a boolean indicating whether the specified identifier is defined.
 boolean equals(ISymbolSet definitions)
          Return a boolean indicating whether the specified SymbolDefinitions object is equal to this object.
 String getName()
          Return the name of this set of symbol definitions.
 Collection<ISymbol> getSymbols()
          Return the symbols that are defined as true in the list of symbol definitions.
 String getSymbolSetString()
           
 String getSymbolValue(String identifier)
          Return the (possibly null) value of the specified identifier.
 void remove(Collection<ISymbol> c)
          Remove a list of symbols
 void remove(String identifier)
          Undefine the specified identifier.
 void setName(String name)
          Set the name of this set of symbol definitions.
 void setSymbols(Map<String,String> definitions)
          Set the definitions set to contain the specified definitions.
 int size()
          Returns the number of symbols on this symbol set
<T> T[]
toArray(T[] a)
          Retusn as array of all symbols on this symbol set
 
Methods inherited from interface org.eclipse.mtj.core.persistence.IPersistable
loadUsing, storeUsing
 

Method Detail

add

ISymbol add(String identifier)
Define the specified identifier.

Parameters:
identifier -

add

ISymbol add(String identifier,
            String value)
Define the specified identifier to be the specified value.

Parameters:
identifier -
value -

add

ISymbol add(String identifier,
            String value,
            int type)
Define the specified identifier to be the specified value.

Parameters:
identifier -
value -

add

void add(Collection<ISymbol> c)
Add a collection of symbols to this symbol set

Parameters:
symbols - to be added

add

void add(ISymbol s)
Add one specific symbol to this symbol set

Parameters:
symbol - to be added

equals

boolean equals(ISymbolSet definitions)
Return a boolean indicating whether the specified SymbolDefinitions object is equal to this object.

Parameters:
definitions -
Returns:

getSymbols

Collection<ISymbol> getSymbols()
Return the symbols that are defined as true in the list of symbol definitions. The list of symbols returned by this method does not include symbols from parent symbol definition sets.

Returns:

getName

String getName()
Return the name of this set of symbol definitions.

Returns:
the name

getSymbolValue

String getSymbolValue(String identifier)
Return the (possibly null) value of the specified identifier.

Parameters:
identifier -
Returns:

contains

boolean contains(String identifier)
Return a boolean indicating whether the specified identifier is defined.

Parameters:
identifier -
Returns:

setSymbols

void setSymbols(Map<String,String> definitions)
Set the definitions set to contain the specified definitions.

Parameters:
definitions -

setName

void setName(String name)
Set the name of this set of symbol definitions.

Parameters:
name - the name to set

getSymbolSetString

String getSymbolSetString()
See Also:
Object.toString()

remove

void remove(String identifier)
Undefine the specified identifier.

Parameters:
identifier -

remove

void remove(Collection<ISymbol> c)
Remove a list of symbols

Parameters:
symbols - to be removed

size

int size()
Returns the number of symbols on this symbol set

Returns:
number of symbols on this symbol set

toArray

<T> T[] toArray(T[] a)
Retusn as array of all symbols on this symbol set

Parameters:
a - array where the elements will be stores
Returns:
array with all symbols

Mobile Tools for Java
Release 1.0