Skip to content

GP-26 replace todo exception #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 2-0-data-structures-and-algorithms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>com.bobocode</groupId>
<artifactId>java-fundamentals-util</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

<parent>
<groupId>com.bobocode</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.bobocode.linked_list;



import com.bobocode.util.ExerciseNotCompletedException;

import java.util.NoSuchElementException;

/**
Expand All @@ -18,7 +22,7 @@ public class LinkedList<T> implements List<T> {
* @return a new list of elements the were passed as method parameters
*/
public static <T> List<T> of(T... elements) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -28,7 +32,7 @@ public static <T> List<T> of(T... elements) {
*/
@Override
public void add(T element) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -40,7 +44,7 @@ public void add(T element) {
*/
@Override
public void add(int index, T element) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -52,7 +56,7 @@ public void add(int index, T element) {
*/
@Override
public void set(int index, T element) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -64,18 +68,18 @@ public void set(int index, T element) {
*/
@Override
public T get(int index) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
* Returns the first element of the list. Operation is performed in constant time O(1)
*
* @return the first element of the list
* @throws java.util.NoSuchElementException if list is empty
* @throws NoSuchElementException if list is empty
*/
@Override
public T getFirst() {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -86,7 +90,7 @@ public T getFirst() {
*/
@Override
public T getLast() {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -97,7 +101,7 @@ public T getLast() {
*/
@Override
public void remove(int index) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}


Expand All @@ -108,7 +112,7 @@ public void remove(int index) {
*/
@Override
public boolean contains(T element) {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -118,7 +122,7 @@ public boolean contains(T element) {
*/
@Override
public boolean isEmpty() {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
Expand All @@ -128,14 +132,14 @@ public boolean isEmpty() {
*/
@Override
public int size() {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}

/**
* Removes all list elements
*/
@Override
public void clear() {
throw new UnsupportedOperationException("This method is not implemented yet"); // todo: implement this method
throw new ExerciseNotCompletedException(); // todo: implement this method
}
}