FileDocCategorySizeDatePackage
Set.javaAPI DocphoneME MR2 API (J2ME)2374Wed May 02 17:59:48 BST 2007util

Set

public class Set extends Object

Fields Summary
private static final int
defaultInitial
int
ninitial
Vector
setData
Constructors Summary
public Set(int nin)


        
	ninitial = nin;
    
public Set()

	ninitial = defaultInitial;
    
Methods Summary
public voidadd(java.lang.Object o)

 addElement( o ); 
public voidaddElement(java.lang.Object o)

	// see if its already in. If not,
	// add at end.
	if ( isIn( o ) ) return;

	// now add, extending if necessary.
	if ( setData == null ){
	    setData = new Vector( ninitial );
	}
	setData.addElement( o );
    
public voiddeleteAllElements()

	setData = null;
    
public java.util.Enumerationelements()

	return (setData==null)?EmptyEnumeration.instance:setData.elements();
    
public booleanisIn(java.lang.Object o)

	return (setData==null)?false:setData.contains( o );
    
public intsize()

 return (setData==null)?0:setData.size();