Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximfersko/list-java
My implementation Generic List
https://github.com/maximfersko/list-java
arraylist java-11 linkedlist list
Last synced: 4 days ago
JSON representation
My implementation Generic List
- Host: GitHub
- URL: https://github.com/maximfersko/list-java
- Owner: maximfersko
- Created: 2023-11-22T07:31:12.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-29T12:23:01.000Z (9 months ago)
- Last Synced: 2024-09-29T14:06:28.450Z (4 days ago)
- Topics: arraylist, java-11, linkedlist, list
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# List-Java
# How to Run Tests:
```shell
cd List
mvn test
```
# MyList InterfaceDefines methods that should be implemented by classes representing list data structures.
## Методы
- `add(int idx, T elm)`: Inserts an element at the specified index.
- `add(T elm)`: Appends an element to the end of the list.
- `get(int idx)`: Returns the element at the specified index.
- `clean()`: Removes all elements from the list, making it empty.
- `remove(int idx)`: Removes the element at the specified index.
- `remove(T elm)`: Removes the first occurrence of the specified element from the list.
- `sort(Comparator comparator)`: Sorts the elements of the list using the specified comparator.
- `size()`: Returns the current size of the list.
- `contains(T elm)`: Checks if the specified element is present in the list.
- `toArray()`: Returns an array containing all elements of the list.# Класс MyArrayList
Implements the MyList interface using an array to store elements.
# Класс MyLinkedList
Implements the MyList interface using a doubly-linked list.