Created
April 4, 2018 20:15
-
-
Save 0xOsiris/4ea2bdb0e4e838da7a31d1f6f06a37ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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