Browse Source

Fix raw class types

Signed-off-by: Chris Cromer <chris@cromer.cl>
master
Chris Cromer 2 years ago
parent
commit
18a04d2d07
  1. 4
      src/main/java/cl/cromer/azaraka/Constants.java
  2. 9
      src/main/java/cl/cromer/azaraka/ai/State.java

4
src/main/java/cl/cromer/azaraka/Constants.java

@ -114,7 +114,7 @@ public interface Constants {
* @param logLevel What log level to use
* @return Returns the logger
*/
default Logger getLogger(Class logClass, LogLevel logLevel) {
default Logger getLogger(Class<?> logClass, LogLevel logLevel) {
String className = logClass.getName();
Logger logger;
if (GLOBAL_LOG) {
@ -152,7 +152,7 @@ public interface Constants {
*
* @param logClass The class to be initialized
*/
default void initializeLogger(Class logClass) {
default void initializeLogger(Class<?> logClass) {
String className = logClass.getName();
Logger logger;
if (GLOBAL_LOG) {

9
src/main/java/cl/cromer/azaraka/ai/State.java

@ -1,5 +1,5 @@
/*
* Copyright 2019 Chris Cromer
* Copyright 2020 Chris Cromer
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
@ -18,7 +18,7 @@ package cl.cromer.azaraka.ai;
/**
* The states used in the AI algorithms
*/
public class State implements Comparable {
public class State implements Comparable<State> {
/**
* The x position being checked
*/
@ -147,12 +147,11 @@ public class State implements Comparable {
/**
* This is used to compare priorities in a priority queue
*
* @param object The object to compare
* @param that The state to compare
* @return Returns the value of Double.compare()
*/
@Override
public int compareTo(Object object) {
State that = (State) object;
public int compareTo(State that) {
return Double.compare(this.getPriority(), that.getPriority());
}

Loading…
Cancel
Save