Skip to content

Instantly share code, notes, and snippets.

@0xOsiris
Created April 4, 2018 20:15
Show Gist options
  • Save 0xOsiris/4ea2bdb0e4e838da7a31d1f6f06a37ea to your computer and use it in GitHub Desktop.
Save 0xOsiris/4ea2bdb0e4e838da7a31d1f6f06a37ea to your computer and use it in GitHub Desktop.
public class ListSet<T> implements Set<T>{
private int find(T e){
int i = 0;
while(elements.hasNext()){
if(elements.next()==null){
return -1;
}else{
if(e==elements.next(){
return elements.next()
}
}
temp = elements.next();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment