Skip to content

Commit

Permalink
Code Smell Fix: use proper casing for non-constant value
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasstarsz committed Apr 27, 2021
1 parent 47953d9 commit 8368b1a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
public class DrawableManager {

private final Map<String, GameObject> gameObjects;
private final Map<String, UIElement> UIElements;
private final Map<String, UIElement> uiElements;

/** Initializes a {@code DrawableManager}'s internals. */
public DrawableManager() {
gameObjects = new LinkedHashMap<>();
UIElements = new LinkedHashMap<>();
uiElements = new LinkedHashMap<>();
}

/**
Expand All @@ -40,7 +40,7 @@ public Map<String, GameObject> getGameObjects() {
* @return The ui elements of the scene.
*/
public Map<String, UIElement> getUIElements() {
return UIElements;
return uiElements;
}

/* Game Objects */
Expand Down Expand Up @@ -90,7 +90,7 @@ public void clearGameObjects() {
* @param guiObject The ui element to add.
*/
public void addUIElement(UIElement guiObject) {
UIElements.put(guiObject.getID(), guiObject);
uiElements.put(guiObject.getID(), guiObject);
}

/**
Expand All @@ -99,7 +99,7 @@ public void addUIElement(UIElement guiObject) {
* @param guiObjectID The id of the ui element to remove.
*/
public void removeUIElement(String guiObjectID) {
UIElements.remove(guiObjectID);
uiElements.remove(guiObjectID);
}

/**
Expand All @@ -113,12 +113,12 @@ public void removeUIElement(UIElement guiObject) {

/** Removes any null values from the list of ui elements for the manager. */
public void refreshUIElementList() {
UIElements.entrySet().removeIf(Objects::isNull);
uiElements.entrySet().removeIf(Objects::isNull);
}

/** Removes all ui elements from the manager. */
public void clearUIElements() {
UIElements.clear();
uiElements.clear();
}

/* reset */
Expand Down

0 comments on commit 8368b1a

Please sign in to comment.