Code example for Set

Methods: addcontainsremove

0
	private LiveBeansModelCollection() { 
		collection = new TreeSet<LiveBeansModel>(); 
	} 
 
	public void addModel(LiveBeansModel model) { 
		if (collection.contains(model)) { 
			collection.remove(model); 
		} 
		collection.add(model); 
	} 
 
	public Set<LiveBeansModel> getCollection() { 
		return collection; 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE