Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.symbol
Interface ISymbolSet

All Superinterfaces:
IPersistable

public interface ISymbolSet
extends IPersistable

Symbol definition sets provide a means to define a group of related symbols with a particular name to reference that group.

Symbol definition sets are most useful for controlling definitions without the need to alter source code. For example, symbol definition sets can be used to remove debugging information to create a production build.

Clients must use MTJCore.getSymbolSetFactory() to retrieve an ISymbolSetFactory instance and use the ISymbolSetFactory.createSymbolSet(String) to create an ISymbolSet instance.

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

Field Summary
 
Fields inherited from interface org.eclipse.mtj.core.persistence. IPersistable
CLASS_PERSISTABLE_ATTRIBUTE, ID_PERSISTABLE_ATTRIBUTE, KEY_PERSISTABLE_ATTRIBUTE, PROPERTY_PERSISTABLE_ELEMENT, REFID_PERSISTABLE_ATTRIBUTE, VALUE_PERSISTABLE_ATTRIBUTE
 
Method Summary
 void add ( Collection< ISymbol> symbols)
          Add a collection of symbols to this symbolset.
 void add ( ISymbol s)
          Add one specific symbol to this symbolset.
  ISymbol add ( String name)
          Define a new symbol in the symbolset with the given name with the a default value (true).
  ISymbol add ( String name, String value)
          Define a new symbol in the symbolset with the given name and value.
  ISymbol add ( String identifier, String value, int type)
          Define a new symbol in the symbolset with the given name, value and type.
 boolean contains ( String symbolname)
          Return a boolean indicating whether the SymbolSet contains a symbol with the given name.
 boolean equals ( ISymbolSet definitions)
          Return a boolean indicating whether the specified SymbolSet object is equal to this SymbolSet.
  String getName ()
          Return the name of this SymbolSet.
  Collection< ISymbol> getSymbols ()
          Returns a collection view of the values contained in this SymbolSet.
  String getSymbolSetString ()
          Returns a string representation of this SymbolSet.
  String getSymbolValue ( String symbolname)
          Return the (possibly null) value of the symbol identified by the given name.
 void remove ( Collection< ISymbol> c)
          Remove a collection of symbols from the SymbolSet.
 void remove ( String symbolname)
          Removes the mapping for the symbol, identified by the given name, from this SymbolSet if present.
 void setName ( String name)
          Set the name of this set of symbol definitions.
 void setSymbols ( Map< String, String> symbols)
          Set the map to be used as the base of the symbols available in the SymolSet.
 int size ()
          Returns the number of symbols on this SymbolSet.
<T> T[]
toArray (T[] a)
          Returns an array containing all of the elements in this SymbolSet.
 
Methods inherited from interface org.eclipse.mtj.core.persistence. IPersistable
loadUsing, storeUsing
 

Method Detail

add

ISymbol add(
String name)
Define a new symbol in the symbolset with the given name with the a default value (true).

Parameters:
name - the symbol name. This is case-sensitive and must not be null or an empty String "".
Returns:
the instance of the newly created symbol that was added to the symbolset.

add

ISymbol add(
String name,
            
String value)
Define a new symbol in the symbolset with the given name and value.

Parameters:
name - the symbol name. This is case-sensitive and must not be null or an empty String "".
value - the symbol value.
Returns:
the instance of the newly created symbol that was added to the symbolset.

add

ISymbol add(
String identifier,
            
String value,
            int type)
Define a new symbol in the symbolset with the given name, value and type.

Parameters:
name - the symbol name. This is case-sensitive and must not be null or an empty String "".
value - the symbol value.
type - the symbol value. Possible types are #TYPE_ABILITY and ISymbol.TYPE_RUNTIME.
Returns:
the instance of the newly created symbol that was added to the symbolset.

add

void add(
Collection<
ISymbol> symbols)
Add a collection of symbols to this symbolset.

Parameters:
symbols - the collection of symbols to be added.

add

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

Parameters:
s - the symbol to be added.

equals

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

Parameters:
definitions - the reference SymbolSet object with which to compare.
Returns:
true if this SymbolSet is the same as the the one from the definitions argument; false otherwise.

getSymbols

Collection<
ISymbol> getSymbols()
Returns a collection view of the values contained in this SymbolSet.

Returns:
a collection view of the values contained in this SymbolSet.

getName

String getName()
Return the name of this SymbolSet.

Returns:
the name of this SymbolSet.

getSymbolValue

String getSymbolValue(
String symbolname)
Return the (possibly null) value of the symbol identified by the given name.

Parameters:
symbolname - the name of the symbol from which the value must be retrieved.
Returns:
the value of the symbol with the given name.

contains

boolean contains(
String symbolname)
Return a boolean indicating whether the SymbolSet contains a symbol with the given name.

Parameters:
symbolname - The symbol name whose presence in the SymbolSet is to be tested.
Returns:
true if this SymbolSet contains a mapping for the specified symbol.

setSymbols

void setSymbols(
Map<
String,
String> symbols)
Set the map to be used as the base of the symbols available in the SymolSet.

Parameters:
symbols - the map to be used as the base of the symbols available in the SymolSet.

setName

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

Parameters:
name - the name to set.This is case-sensitive and must not be null or an empty String "".

getSymbolSetString

String getSymbolSetString()
Returns a string representation of this SymbolSet. The string representation consists of a list of the SymbolSet's elements in the order they are returned by its iterator Adjacent elements are separated by the characters "," (comma). This implementation creates an empty string buffer, iterates over the SymbolSet appending the string representation of each element in turn. After appending each element except the last, the string "," is appended. A string is obtained from the string buffer, and returned.

Returns:
a string representation of this SymbolSet.

remove

void remove(
String symbolname)
Removes the mapping for the symbol, identified by the given name, from this SymbolSet if present.

Parameters:
symbolname - the name of the symbol whose mapping is to be removed from the SymbolSet.

remove

void remove(
Collection<
ISymbol> c)
Remove a collection of symbols from the SymbolSet.

Parameters:
symbols - a collection of symbols to be removed from the SymbolSet.

size

int size()
Returns the number of symbols on this SymbolSet.

Returns:
number of symbols on this SymbolSet.

toArray

<T> T[] toArray(T[] a)
Returns an array containing all of the elements in this SymbolSet.

Parameters:
a - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this SymbolSet.

Mobile Tools for Java
Release 1.0


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire