This file contains hidden or 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
package lesson7.mylist; | |
public class Node { | |
private Object o; | |
private Node node; | |
public Node() { | |
} |
This file contains hidden or 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
package lesson7.mylist; | |
public class SimpleLinkedList { | |
private Node root; | |
private int size; | |
public SimpleLinkedList() { | |
size = 0; |
This file contains hidden or 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
package lesson7.mylist; | |
public class SimpleLinkedList { | |
private Node root; | |
private int size; | |
public SimpleLinkedList() { | |
size = 0; |
This file contains hidden or 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
package lesson7.mylist; | |
public class SimpleLinkedList { | |
private Node root; | |
private int size; | |
public SimpleLinkedList() { | |
size = 0; |
This file contains hidden or 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
package lesson7.mylist; | |
public class Launcher { | |
public static void main(String[] args) { | |
SimpleLinkedList sl = new SimpleLinkedList(); | |
sl.addFirst("object1"); |
This file contains hidden or 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
package lesson7.mylist; | |
public class Launcher { | |
public static void main(String[] args) { | |
SimpleLinkedList sl = new SimpleLinkedList(); | |
sl.addFirst("object1"); | |
sl.addFirst("object2"); |
This file contains hidden or 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
package lesson7.mylist; | |
import java.util.Iterator; | |
public class Launcher { | |
public static void main(String[] args) { | |
SimpleLinkedList sl = new SimpleLinkedList(); |
This file contains hidden or 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
package lesson7.CompList; | |
import java.util.Comparator; | |
public class CompList implements Comparator { | |
@Override | |
public int compare(Object o1, Object o2) { | |
String oStr1 = (String) o1; |
This file contains hidden or 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
package lesson7.hashcodeoverriding; | |
public class Launcher { | |
public static void main(String[] args) { | |
Person p1 = new Person(); | |
Person p2 = new Person(); | |
p1.setName("Ivan"); |
This file contains hidden or 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
package lesson7.hashcodeoverriding; | |
public class Address { | |
private String city; | |
private String street; | |
private int house; | |
public Address() { | |
} |