git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git]
/
src
/
jalview
/
datamodel
/
features
/
FeatureAttributes.java
diff --git
a/src/jalview/datamodel/features/FeatureAttributes.java
b/src/jalview/datamodel/features/FeatureAttributes.java
index
f51fe48
..
7acebee
100644
(file)
--- a/
src/jalview/datamodel/features/FeatureAttributes.java
+++ b/
src/jalview/datamodel/features/FeatureAttributes.java
@@
-1,8
+1,5
@@
package jalview.datamodel.features;
package jalview.datamodel.features;
-import jalview.bin.ApplicationSingletonProvider;
-import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@
-15,23
+12,14
@@
import java.util.TreeMap;
/**
* A singleton class to hold the set of attributes known for each feature type
*/
/**
* A singleton class to hold the set of attributes known for each feature type
*/
-public class FeatureAttributes implements ApplicationSingletonI
+public class FeatureAttributes
{
public enum Datatype
{
Character, Number, Mixed
}
{
public enum Datatype
{
Character, Number, Mixed
}
- public static FeatureAttributes getInstance()
- {
- return (FeatureAttributes) ApplicationSingletonProvider
- .getInstance(FeatureAttributes.class);
- }
-
- private FeatureAttributes()
- {
- attributes = new HashMap<>();
- }
+ private static FeatureAttributes instance = new FeatureAttributes();
/*
* map, by feature type, of a map, by attribute name, of
/*
* map, by feature type, of a map, by attribute name, of
@@
-185,6
+173,21
@@
public class FeatureAttributes implements ApplicationSingletonI
}
/**
}
/**
+ * Answers the singleton instance of this class
+ *
+ * @return
+ */
+ public static FeatureAttributes getInstance()
+ {
+ return instance;
+ }
+
+ private FeatureAttributes()
+ {
+ attributes = new HashMap<>();
+ }
+
+ /**
* Answers the attribute names known for the given feature type, in
* alphabetical order (not case sensitive), or an empty set if no attributes
* are known. An attribute name is typically 'simple' e.g. "AC", but may be
* Answers the attribute names known for the given feature type, in
* alphabetical order (not case sensitive), or an empty set if no attributes
* are known. An attribute name is typically 'simple' e.g. "AC", but may be