*/
package jalview.ws.sifts;
-import jalview.bin.Jalview;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import java.util.Objects;
-public class SiftsSettings
+public class SiftsSettings implements ApplicationSingletonI
{
+
+ /**
+ * public only for testng
+ *
+ * @return
+ */
+ public static SiftsSettings getInstance()
+ {
+ return (SiftsSettings) ApplicationSingletonProvider
+ .getInstance(SiftsSettings.class);
+ }
+
+ private SiftsSettings()
+ {
+ // singleton; use getInstance()
+ }
+
private boolean mapWithSifts = false;
private String siftDownloadDirectory;
private int failSafePIDThreshold;
- private static SiftsSettings getInstance()
- {
- {
- Jalview j = Jalview.getInstance();
- return (j.siftsSettings == null
- ? j.siftsSettings = new SiftsSettings()
- : j.siftsSettings);
- }
-
- }
public static boolean isMapWithSifts()
{
return getInstance().mapWithSifts;