SHARE
TWEET

Untitled

a guest Jun 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  public ISet<T> diff(ISet<T> aSet)
  2.     {
  3.          T[] aTmp = (T[])aSet.getAll();
  4.        ISet<T> newSet = new Set();
  5.      
  6.        for(int i = 0 ; i < this.elem; i++)
  7.        {
  8.            newSet.add(((T)this.set[i]));
  9.        }
  10.        for(int i = 0; i < aTmp.length; i++)
  11.        {
  12.             if(newSet.isMember(aTmp[i]))
  13.             {
  14.                 newSet.remove(aTmp[i]);
  15.             }
  16.        }
  17.        return newSet;
  18.     }
RAW Paste Data
Want to get better at Java?
Learn to code Java in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top