git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43c826c
)
JAL-2808 convenience method to get attribute as String
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 2 Nov 2017 14:44:23 +0000
(14:44 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 2 Nov 2017 14:44:23 +0000
(14:44 +0000)
src/jalview/datamodel/SequenceFeature.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/SequenceFeature.java
b/src/jalview/datamodel/SequenceFeature.java
index
5029da5
..
ffbd497
100755
(executable)
--- a/
src/jalview/datamodel/SequenceFeature.java
+++ b/
src/jalview/datamodel/SequenceFeature.java
@@
-393,6
+393,23
@@
public class SequenceFeature implements FeatureLocationI
}
/**
+ * Answers the value of the specified attribute as string, or null if no such
+ * value
+ *
+ * @param key
+ * @return
+ */
+ public String getValueAsString(String key)
+ {
+ if (otherDetails == null)
+ {
+ return null;
+ }
+ Object value = otherDetails.get(key);
+ return value == null ? null : value.toString();
+ }
+
+ /**
* Returns a property value for the given key if known, else the specified
* default value
*