style: enable MemberName in checkstyle (#5193)

* style: enable MemberName in checkstyle

* style: simply uncomment `MemberName`

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
S. Utkarsh
2024-05-30 02:14:14 +05:30
committed by GitHub
parent d2bfb100b2
commit a6e873deef
17 changed files with 168 additions and 168 deletions

View File

@@ -15,7 +15,7 @@ public class GenericArrayListQueue<T> {
/**
* The generic ArrayList for the queue T is the generic element
*/
ArrayList<T> _queue = new ArrayList<>();
ArrayList<T> elementList = new ArrayList<>();
/**
* Checks if the queue has elements (not empty).
@@ -23,7 +23,7 @@ public class GenericArrayListQueue<T> {
* @return True if the queue has elements. False otherwise.
*/
private boolean hasElements() {
return !_queue.isEmpty();
return !elementList.isEmpty();
}
/**
@@ -35,7 +35,7 @@ public class GenericArrayListQueue<T> {
public T peek() {
T result = null;
if (this.hasElements()) {
result = _queue.get(0);
result = elementList.get(0);
}
return result;
}
@@ -47,7 +47,7 @@ public class GenericArrayListQueue<T> {
* @return True if the element was added successfully
*/
public boolean add(T element) {
return _queue.add(element);
return elementList.add(element);
}
/**
@@ -58,7 +58,7 @@ public class GenericArrayListQueue<T> {
public T pull() {
T result = null;
if (this.hasElements()) {
result = _queue.remove(0);
result = elementList.remove(0);
}
return result;
}