Skip to content

'Find in reference' will work even if no text has been selected. #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 23, 2012
Merged
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
Introduce ObjectUtils class
  • Loading branch information
s17t committed Aug 19, 2012
commit 8a1cf335ad9ffe3e2f2a2b2214f1aea465818808
13 changes: 13 additions & 0 deletions app/src/processing/app/ObjectUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package processing.app;

public class ObjectUtil {

public static boolean isNull(Object o) {
return o == null;
}

public static <T> T defaultIfEmpty(T obj, T defaultObj) {
if (isNull(obj)) return defaultObj;
return obj;
}
}