Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up code
Appled Source > Clean Up in Eclipse, to update newest classes with the
IJ2 style template.
  • Loading branch information
hinerm committed Jul 25, 2014
commit 90503281bac8b304673f074ca5a81bc58c66d331
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down
43 changes: 14 additions & 29 deletions src/main/java/org/scijava/preferences/DefaultPrefService.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down Expand Up @@ -66,9 +66,7 @@ public String get(final String name, final String defaultValue) {
}

@Override
public boolean
getBoolean(final String name, final boolean defaultValue)
{
public boolean getBoolean(final String name, final boolean defaultValue) {
return getBoolean(null, name, defaultValue);
}

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

@Override
public int getInt(final Class<?> c, final String name,
final int defaultValue)
public int
getInt(final Class<?> c, final String name, final int defaultValue)
{
return prefs(c).getInt(key(c, name), defaultValue);
}
Expand All @@ -172,30 +170,22 @@ public long getLong(final Class<?> c, final String name,
}

@Override
public void
put(final Class<?> c, final String name, final String value)
{
public void put(final Class<?> c, final String name, final String value) {
prefs(c).put(key(c, name), value);
}

@Override
public void put(final Class<?> c, final String name,
final boolean value)
{
public void put(final Class<?> c, final String name, final boolean value) {
prefs(c).putBoolean(key(c, name), value);
}

@Override
public void
put(final Class<?> c, final String name, final double value)
{
public void put(final Class<?> c, final String name, final double value) {
prefs(c).putDouble(key(c, name), value);
}

@Override
public void
put(final Class<?> c, final String name, final float value)
{
public void put(final Class<?> c, final String name, final float value) {
prefs(c).putFloat(key(c, name), value);
}

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

@Override
public void put(final Class<?> c, final String name, final long value)
{
public void put(final Class<?> c, final String name, final long value) {
prefs(c).putLong(key(c, name), value);
}

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

@Override
public void putList(final Preferences preferences,
final List<String> list, final String key)
public void putList(final Preferences preferences, final List<String> list,
final String key)
{
putList(preferences.node(key), list);
}

/** Puts a list into the preferences. */
@Override
public void putList(final Preferences preferences,
final List<String> list)
{
public void putList(final Preferences preferences, final List<String> list) {
if (preferences == null) {
throw new IllegalArgumentException("Preferences not set.");
}
Expand All @@ -365,9 +352,7 @@ public List<String> getList(final String key) {
}

@Override
public List<String> getList(final Preferences preferences,
final String key)
{
public List<String> getList(final Preferences preferences, final String key) {
return getList(preferences.node(key));
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/scijava/preferences/PrefService.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/scijava/util/Prefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down Expand Up @@ -45,7 +45,7 @@
* "http://www.java2s.com/Code/Java/Development-Class/Utilityclassforpreferences.htm"
* >PrefsUtil class by Robin Sharp of Javelin Software.</a>.
* </p>
*
*
* @author Curtis Rueden
* @author Barry DeZonia
* @author Grant Harris
Expand Down Expand Up @@ -300,7 +300,7 @@ public static List<String> getList(final Preferences preferences) {
public static void setDelegateService(final PrefService prefService,
final double priority)
{
if (Double.compare(priority, Prefs.servicePriority) > 0) {
if (Double.compare(priority, Prefs.servicePriority) > 0) {
Prefs.prefService = prefService;
Prefs.servicePriority = priority;
}
Expand Down