Code example for TreeSet

Methods: clear

0
	public void removePhonesNumbers(String phoneNumber) {
		this.phonesNumbers.remove(phoneNumber);
	} 
	 
	public void clearPhonesNumbers() { 
		this.phonesNumbers.clear();
	} 
	 
	public boolean addEmailAddress(String emailAddress) {
		if ( emailAddress.matches("^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$") ) {
			this.emailsAddresses.add(emailAddress);
			return(true); 
		} 
		return(false); 
	} 
	public void removeEmailAddress(String emailAddress) {
		this.emailsAddresses.remove(emailAddress);
	} 
	 
	public String[] getPhonesNumbers() {		
		return( (String[])this.phonesNumbers.toArray(new String[this.phonesNumbers.size()]) );