Skip to content

Commit 9050328

Browse files
committed
Clean up code
Appled Source > Clean Up in Eclipse, to update newest classes with the IJ2 style template.
1 parent ce0f105 commit 9050328

File tree

4 files changed

+22
-37
lines changed

4 files changed

+22
-37
lines changed

src/main/java/org/scijava/preferences/AbstractPrefService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

src/main/java/org/scijava/preferences/DefaultPrefService.java

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -66,9 +66,7 @@ public String get(final String name, final String defaultValue) {
6666
}
6767

6868
@Override
69-
public boolean
70-
getBoolean(final String name, final boolean defaultValue)
71-
{
69+
public boolean getBoolean(final String name, final boolean defaultValue) {
7270
return getBoolean(null, name, defaultValue);
7371
}
7472

@@ -158,8 +156,8 @@ public float getFloat(final Class<?> c, final String name,
158156
}
159157

160158
@Override
161-
public int getInt(final Class<?> c, final String name,
162-
final int defaultValue)
159+
public int
160+
getInt(final Class<?> c, final String name, final int defaultValue)
163161
{
164162
return prefs(c).getInt(key(c, name), defaultValue);
165163
}
@@ -172,30 +170,22 @@ public long getLong(final Class<?> c, final String name,
172170
}
173171

174172
@Override
175-
public void
176-
put(final Class<?> c, final String name, final String value)
177-
{
173+
public void put(final Class<?> c, final String name, final String value) {
178174
prefs(c).put(key(c, name), value);
179175
}
180176

181177
@Override
182-
public void put(final Class<?> c, final String name,
183-
final boolean value)
184-
{
178+
public void put(final Class<?> c, final String name, final boolean value) {
185179
prefs(c).putBoolean(key(c, name), value);
186180
}
187181

188182
@Override
189-
public void
190-
put(final Class<?> c, final String name, final double value)
191-
{
183+
public void put(final Class<?> c, final String name, final double value) {
192184
prefs(c).putDouble(key(c, name), value);
193185
}
194186

195187
@Override
196-
public void
197-
put(final Class<?> c, final String name, final float value)
198-
{
188+
public void put(final Class<?> c, final String name, final float value) {
199189
prefs(c).putFloat(key(c, name), value);
200190
}
201191

@@ -205,8 +195,7 @@ public void put(final Class<?> c, final String name, final int value) {
205195
}
206196

207197
@Override
208-
public void put(final Class<?> c, final String name, final long value)
209-
{
198+
public void put(final Class<?> c, final String name, final long value) {
210199
prefs(c).putLong(key(c, name), value);
211200
}
212201

@@ -338,17 +327,15 @@ public void putList(final List<String> list, final String key) {
338327
}
339328

340329
@Override
341-
public void putList(final Preferences preferences,
342-
final List<String> list, final String key)
330+
public void putList(final Preferences preferences, final List<String> list,
331+
final String key)
343332
{
344333
putList(preferences.node(key), list);
345334
}
346335

347336
/** Puts a list into the preferences. */
348337
@Override
349-
public void putList(final Preferences preferences,
350-
final List<String> list)
351-
{
338+
public void putList(final Preferences preferences, final List<String> list) {
352339
if (preferences == null) {
353340
throw new IllegalArgumentException("Preferences not set.");
354341
}
@@ -365,9 +352,7 @@ public List<String> getList(final String key) {
365352
}
366353

367354
@Override
368-
public List<String> getList(final Preferences preferences,
369-
final String key)
370-
{
355+
public List<String> getList(final Preferences preferences, final String key) {
371356
return getList(preferences.node(key));
372357
}
373358

src/main/java/org/scijava/preferences/PrefService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

src/main/java/org/scijava/util/Prefs.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -45,7 +45,7 @@
4545
* "http://www.java2s.com/Code/Java/Development-Class/Utilityclassforpreferences.htm"
4646
* >PrefsUtil class by Robin Sharp of Javelin Software.</a>.
4747
* </p>
48-
*
48+
*
4949
* @author Curtis Rueden
5050
* @author Barry DeZonia
5151
* @author Grant Harris
@@ -300,7 +300,7 @@ public static List<String> getList(final Preferences preferences) {
300300
public static void setDelegateService(final PrefService prefService,
301301
final double priority)
302302
{
303-
if (Double.compare(priority, Prefs.servicePriority) > 0) {
303+
if (Double.compare(priority, Prefs.servicePriority) > 0) {
304304
Prefs.prefService = prefService;
305305
Prefs.servicePriority = priority;
306306
}

0 commit comments

Comments
 (0)