Browse Source

initial implement of all methods

master
David 2 years ago
parent
commit
8f26accf08
5 changed files with 130 additions and 0 deletions
  1. +6
    -0
      .idea/misc.xml
  2. +8
    -0
      .idea/modules.xml
  3. +11
    -0
      HUE_06_Generics.iml
  4. +100
    -0
      src/ChainQueue.java
  5. +5
    -0
      src/HUE_06_Generics.java

+ 6
- 0
.idea/misc.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/HUE_06_Generics.iml" filepath="$PROJECT_DIR$/HUE_06_Generics.iml" />
</modules>
</component>
</project>

+ 11
- 0
HUE_06_Generics.iml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

+ 100
- 0
src/ChainQueue.java View File

@@ -0,0 +1,100 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.Queue;


public class ChainQueue<E> implements Queue<E> {
@Override
public int size() {
return 0;
}

@Override
public boolean isEmpty() {
return false;
}

@Override
public boolean contains(Object o) {
return false;
}

@Override
public Iterator<E> iterator() {
return null;
}

@Override
public Object[] toArray() {
return new Object[0];
}

@Override
public <T> T[] toArray(T[] ts) {
return null;
}

@Override
public boolean add(E e) {
return false;
}

@Override
public boolean remove(Object o) {
return false;
}

@Override
public boolean containsAll(Collection<?> collection) {
return false;
}

@Override
public boolean addAll(Collection<? extends E> collection) {
return false;
}

@Override
public boolean removeAll(Collection<?> collection) {
return false;
}

@Override
public boolean retainAll(Collection<?> collection) {
return false;
}

@Override
public void clear() {

}

@Override
public boolean offer(E e) {
return false;
}

@Override
public E remove() {
return null;
}

@Override
public E poll() {
return null;
}

@Override
public E element() {
return null;
}

@Override
public E peek() {
return null;
}

private class Node<E> {

}
}

+ 5
- 0
src/HUE_06_Generics.java View File

@@ -0,0 +1,5 @@
public class HUE_06_Generics {
public static void main(String[] args) {

}
}

Loading…
Cancel
Save