MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getInt

Method getInt

ij/src/main/java/ij/Prefs.java:837–847  ·  view source on GitHub ↗

Retrieves a number from IJ_Props or IJ_Prefs.txt. Does not retrieve numbers set using Prefs.set().

(String key, int defaultValue)

Source from the content-addressed store, hash-verified

835 /** Retrieves a number from IJ_Props or IJ_Prefs.txt.
836 Does not retrieve numbers set using Prefs.set(). */
837 public static int getInt(String key, int defaultValue) {
838 if (props==null) //workaround for Netscape JIT bug
839 return defaultValue;
840 String s = props.getProperty(key);
841 if (s!=null) {
842 try {
843 return Integer.decode(s).intValue();
844 } catch (NumberFormatException e) {IJ.log(""+e);}
845 }
846 return defaultValue;
847 }
848
849 /** Retrieves a number from IJ_Props or IJ_Prefs.txt.
850 Does not retrieve numbers set using Prefs.set(). */

Callers 10

loadOptionsMethod · 0.95
getThreadsMethod · 0.95
getColorMethod · 0.95
getPreferredLocationMethod · 0.95
MenusMethod · 0.95
ParticleAnalyzerClass · 0.95
AnalyzerClass · 0.95
ImportDialogClass · 0.95
NewImageClass · 0.95
PlotWindowClass · 0.95

Calls 3

logMethod · 0.95
getPropertyMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected