Fix raw class types

Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
Chris Cromer 2020-02-25 20:42:42 -03:00
parent 21f54beca5
commit 18a04d2d07
2 changed files with 6 additions and 7 deletions

View File

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

View File

@ -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: * 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 * The states used in the AI algorithms
*/ */
public class State implements Comparable { public class State implements Comparable<State> {
/** /**
* The x position being checked * The x position being checked
*/ */
@ -147,12 +147,11 @@ public class State implements Comparable {
/** /**
* This is used to compare priorities in a priority queue * 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() * @return Returns the value of Double.compare()
*/ */
@Override @Override
public int compareTo(Object object) { public int compareTo(State that) {
State that = (State) object;
return Double.compare(this.getPriority(), that.getPriority()); return Double.compare(this.getPriority(), that.getPriority());
} }