Code example for TreeSet

Methods: size, toArray

0
        return result;
    } 
 
    private IProfile[] getProfilesWithoutVendor(Set vendors) {
        ArrayList<IProfile> result = new ArrayList<IProfile>();
        IProfile[] profiles = this.profiles.toArray(new IProfile[this.profiles.size()]);
 
        for (int i = 0; i < profiles.length; i++) {
            if (!vendors.contains(profiles[i].getVendor())) {
                result.add(profiles[i]);
            } 
        } 
 
        return result.toArray(new IProfile[result.size()]);
    } 
 
    private String vendorString(Set<IVendor> vendors) {
        if (vendors.size() == 0) {
            return ""; 
        }