Skip to content

Commit c3e06bd

Browse files
committed
use diamond notation when it clarifies the code
1 parent 80eebb4 commit c3e06bd

File tree

93 files changed

+231
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+231
-231
lines changed

jme3-android-examples/src/main/java/jme3test/android/TestAndroidSensors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class TestAndroidSensors extends SimpleApplication implements ActionListe
3838

3939
private Geometry geomZero = null;
4040
// Map of joysticks saved with the joyId as the key
41-
private IntMap<Joystick> joystickMap = new IntMap<Joystick>();
41+
private IntMap<Joystick> joystickMap = new IntMap<>();
4242
// flag to allow for the joystick axis to be calibrated on startup
4343
private boolean initialCalibrationComplete = false;
4444
// mappings used for onAnalog

jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/CustomArrayAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ protected FilterResults performFiltering(CharSequence constraint){
125125
String prefix = constraint.toString().toLowerCase();
126126
Log.i(TAG, "performFiltering: entries size: " + entries.size());
127127
if (prefix == null || prefix.length() == 0){
128-
ArrayList<String> list = new ArrayList<String>(entries);
128+
ArrayList<String> list = new ArrayList<>(entries);
129129
results.values = list;
130130
results.count = list.size();
131131
Log.i(TAG, "clearing filter with size: " + list.size());
132132
}else{
133-
final ArrayList<String> list = new ArrayList<String>(entries);
134-
final ArrayList<String> nlist = new ArrayList<String>();
133+
final ArrayList<String> list = new ArrayList<>(entries);
134+
final ArrayList<String> nlist = new ArrayList<>();
135135
int count = list.size();
136136

137137
for (int i = 0; i<count; i++){

jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
7474
/* Fields to contain the current position and display contents of the spinner */
7575
private int currentPosition = 0;
7676
private String currentSelection = "";
77-
private List<String> classNames = new ArrayList<String>();
78-
private List<String> exclusions = new ArrayList<String>();
77+
private List<String> classNames = new ArrayList<>();
78+
private List<String> exclusions = new ArrayList<>();
7979
private String rootPackage;
8080

8181
/* ListView that displays the test application class names. */

jme3-android/src/main/java/com/jme3/app/state/MjpegFileWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -457,7 +457,7 @@ private class AVIIndexList {
457457

458458
public byte[] fcc = new byte[]{'i', 'd', 'x', '1'};
459459
public int cb = 0;
460-
public List<AVIIndex> ind = new ArrayList<AVIIndex>();
460+
public List<AVIIndex> ind = new ArrayList<>();
461461

462462
public AVIIndexList() {
463463
}

jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private class VideoProcessor implements SceneProcessor {
224224
private RenderManager renderManager;
225225
private boolean isInitilized = false;
226226
private LinkedBlockingQueue<WorkItem> freeItems;
227-
private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<WorkItem>();
227+
private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<>();
228228
private MjpegFileWriter writer;
229229
private boolean fastMode = true;
230230
private AppProfiler prof;

jme3-android/src/main/java/com/jme3/input/android/AndroidJoyInput.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ public class AndroidJoyInput implements JoyInput {
8383
public static boolean disableSensors = false;
8484

8585
protected AndroidInputHandler inputHandler;
86-
protected List<Joystick> joystickList = new ArrayList<Joystick>();
86+
protected List<Joystick> joystickList = new ArrayList<>();
8787
// private boolean dontSendHistory = false;
8888

8989

9090
// Internal
9191
private boolean initialized = false;
9292
private RawInputListener listener = null;
93-
private ConcurrentLinkedQueue<InputEvent> eventQueue = new ConcurrentLinkedQueue<InputEvent>();
93+
private ConcurrentLinkedQueue<InputEvent> eventQueue = new ConcurrentLinkedQueue<>();
9494
private AndroidSensorJoyInput sensorJoyInput;
9595
private Vibrator vibrator = null;
9696
private boolean vibratorActive = false;

jme3-android/src/main/java/com/jme3/input/android/AndroidJoystickJoyInput14.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2015 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -65,7 +65,7 @@ public class AndroidJoystickJoyInput14 {
6565

6666
private boolean loaded = false;
6767
private AndroidJoyInput joyInput;
68-
private Map<Integer, AndroidJoystick> joystickIndex = new HashMap<Integer, AndroidJoystick>();
68+
private Map<Integer, AndroidJoystick> joystickIndex = new HashMap<>();
6969

7070
private static int[] AndroidGamepadButtons = {
7171
// Dpad buttons
@@ -109,7 +109,7 @@ public void destroy() {
109109

110110
public List<Joystick> loadJoysticks(int joyId, InputManager inputManager) {
111111
logger.log(Level.INFO, "loading Joystick devices");
112-
ArrayList<Joystick> joysticks = new ArrayList<Joystick>();
112+
ArrayList<Joystick> joysticks = new ArrayList<>();
113113
joysticks.clear();
114114
joystickIndex.clear();
115115

@@ -245,8 +245,8 @@ protected class AndroidJoystick extends AbstractJoystick {
245245
private JoystickAxis yAxis;
246246
private JoystickAxis povX;
247247
private JoystickAxis povY;
248-
private Map<Integer, JoystickAxis> axisIndex = new HashMap<Integer, JoystickAxis>();
249-
private Map<Integer, JoystickButton> buttonIndex = new HashMap<Integer, JoystickButton>();
248+
private Map<Integer, JoystickAxis> axisIndex = new HashMap<>();
249+
private Map<Integer, JoystickButton> buttonIndex = new HashMap<>();
250250

251251
public AndroidJoystick( InputManager inputManager, JoyInput joyInput, InputDevice device,
252252
int joyId, String name ) {

jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,7 @@ public class AndroidSensorJoyInput implements SensorEventListener {
7878
private AndroidJoyInput joyInput;
7979
private SensorManager sensorManager = null;
8080
private WindowManager windowManager = null;
81-
private IntMap<SensorData> sensors = new IntMap<SensorData>();
81+
private IntMap<SensorData> sensors = new IntMap<>();
8282
private int lastRotation = 0;
8383
private boolean loaded = false;
8484

@@ -96,7 +96,7 @@ private class SensorData {
9696
int sensorAccuracy = -1;
9797
float[] lastValues;
9898
final Object valuesLock = new Object();
99-
ArrayList<AndroidSensorJoystickAxis> axes = new ArrayList<AndroidSensorJoystickAxis>();
99+
ArrayList<AndroidSensorJoystickAxis> axes = new ArrayList<>();
100100
boolean enabled = false;
101101
boolean haveData = false;
102102

jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -72,8 +72,8 @@ public class AndroidTouchInput implements TouchInput {
7272
private boolean dontSendHistory = false;
7373

7474
protected int numPointers = 0;
75-
final private HashMap<Integer, Vector2f> lastPositions = new HashMap<Integer, Vector2f>();
76-
final private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<InputEvent>();
75+
final private HashMap<Integer, Vector2f> lastPositions = new HashMap<>();
76+
final private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<>();
7777
private final static int MAX_TOUCH_EVENTS = 1024;
7878
private final TouchEventPool touchEventPool = new TouchEventPool(MAX_TOUCH_EVENTS);
7979
private float scaleX = 1f;

jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput14.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2012 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@
4646
*/
4747
public class AndroidTouchInput14 extends AndroidTouchInput {
4848
private static final Logger logger = Logger.getLogger(AndroidTouchInput14.class.getName());
49-
final private HashMap<Integer, Vector2f> lastHoverPositions = new HashMap<Integer, Vector2f>();
49+
final private HashMap<Integer, Vector2f> lastHoverPositions = new HashMap<>();
5050

5151
public AndroidTouchInput14(AndroidInputHandler androidInput) {
5252
super(androidInput);

0 commit comments

Comments
 (0)