diff options
4 files changed, 14 insertions, 17 deletions
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java index 4db16eb..c9247d4 100644 --- a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java +++ b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java @@ -3,7 +3,7 @@ * * This file is part of Ardor3D. * - * Ardor3D is free software: you can redistribute it and/or modify it + * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ @@ -16,13 +16,13 @@ import java.awt.event.FocusListener; import java.awt.event.KeyListener; import java.util.EnumSet; import java.util.LinkedList; +import java.util.Objects; import com.ardor3d.annotation.GuardedBy; import com.ardor3d.input.Key; import com.ardor3d.input.KeyEvent; import com.ardor3d.input.KeyState; import com.ardor3d.input.KeyboardWrapper; -import com.google.common.base.Preconditions; import com.google.common.collect.AbstractIterator; import com.google.common.collect.PeekingIterator; @@ -43,7 +43,7 @@ public class AwtKeyboardWrapper implements KeyboardWrapper, KeyListener { protected final EnumSet<Key> _pressedList = EnumSet.noneOf(Key.class); public AwtKeyboardWrapper(final Component component) { - _component = Preconditions.checkNotNull(component, "component"); + _component = Objects.requireNonNull(component, "component"); } @Override @@ -101,7 +101,7 @@ public class AwtKeyboardWrapper implements KeyboardWrapper, KeyListener { /** * Convert from AWT key event to Ardor3D Key. Override to provide additional or custom behavior. - * + * * @param e * the AWT KeyEvent received by the input system. * @return an Ardor3D Key, to be forwarded to the Predicate/Trigger system. diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/logical/TwoInputStates.java b/ardor3d-core/src/main/java/com/ardor3d/input/logical/TwoInputStates.java index 76cff2e..205055a 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/logical/TwoInputStates.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/logical/TwoInputStates.java @@ -10,8 +10,6 @@ package com.ardor3d.input.logical; -import static com.google.common.base.Preconditions.checkNotNull; - import java.util.Objects; import com.ardor3d.annotation.Immutable; @@ -39,8 +37,8 @@ public final class TwoInputStates { * if either parameter is null */ public TwoInputStates(final InputState previous, final InputState current) { - _previous = checkNotNull(previous, "previous"); - _current = checkNotNull(current, "current"); + _previous = Objects.requireNonNull(previous, "previous"); + _current = Objects.requireNonNull(current, "current"); } public InputState getPrevious() { diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java index 119820d..b3cbb6c 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java @@ -3,7 +3,7 @@ * * This file is part of Ardor3D. * - * Ardor3D is free software: you can redistribute it and/or modify it + * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ @@ -12,6 +12,7 @@ package com.ardor3d.input.jogl; import java.util.EnumSet; import java.util.LinkedList; +import java.util.Objects; import com.ardor3d.annotation.GuardedBy; import com.ardor3d.framework.jogl.NewtWindowContainer; @@ -19,7 +20,6 @@ import com.ardor3d.input.Key; import com.ardor3d.input.KeyEvent; import com.ardor3d.input.KeyState; import com.ardor3d.input.KeyboardWrapper; -import com.google.common.base.Preconditions; import com.google.common.collect.AbstractIterator; import com.google.common.collect.PeekingIterator; import com.jogamp.newt.event.KeyAdapter; @@ -46,7 +46,7 @@ public class JoglNewtKeyboardWrapper extends KeyAdapter implements KeyboardWrapp public JoglNewtKeyboardWrapper(final NewtWindowContainer newtWindowContainer) { super(); - _newtWindow = Preconditions.checkNotNull(newtWindowContainer.getNewtWindow(), "newtWindow"); + _newtWindow = Objects.requireNonNull(newtWindowContainer.getNewtWindow(), "newtWindow"); } @Override @@ -102,7 +102,7 @@ public class JoglNewtKeyboardWrapper extends KeyAdapter implements KeyboardWrapp /** * Convert from NEWT key event to Ardor3D Key. Override to provide additional or custom behavior. - * + * * @param e * the NEWT KeyEvent received by the input system. * @return an Ardor3D Key, to be forwarded to the Predicate/Trigger system. diff --git a/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtKeyboardWrapper.java b/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtKeyboardWrapper.java index 614bd40..fe47753 100644 --- a/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtKeyboardWrapper.java +++ b/ardor3d-swt/src/main/java/com/ardor3d/input/swt/SwtKeyboardWrapper.java @@ -3,16 +3,15 @@ * * This file is part of Ardor3D. * - * Ardor3D is free software: you can redistribute it and/or modify it + * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ package com.ardor3d.input.swt; -import static com.google.common.base.Preconditions.checkNotNull; - import java.util.LinkedList; +import java.util.Objects; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.widgets.Control; @@ -43,7 +42,7 @@ public class SwtKeyboardWrapper implements KeyboardWrapper, KeyListener { public SwtKeyboardWrapper(final Control control) { _upcomingEvents = new LinkedList<>(); - _control = checkNotNull(control, "control"); + _control = Objects.requireNonNull(control, "control"); } @Override @@ -92,7 +91,7 @@ public class SwtKeyboardWrapper implements KeyboardWrapper, KeyListener { /** * Convert from SWT key event to Ardor3D Key. Override to provide additional or custom behavior. - * + * * @param e * the SWT KeyEvent received by the input system. * @return an Ardor3D Key, to be forwarded to the Predicate/Trigger system. |