Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void substitute(AnyType x, AnyType y, Comparator<AnyType> cmp){
- for (int i=0; i< this.theSize; i++) {
- Node<AnyType> p = getNode(i);
- if (cmp.compare(p.data, x)==0){
- p.data = y;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement