From a30b21bb66cb7faef19bd1c2417be687970babcf Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 3 Oct 2019 15:57:11 +0100 Subject: [PATCH] JAL-3383 tidy method signature and Javadoc --- src/jalview/datamodel/features/FeatureStore.java | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/jalview/datamodel/features/FeatureStore.java b/src/jalview/datamodel/features/FeatureStore.java index 6204f18..653d389 100644 --- a/src/jalview/datamodel/features/FeatureStore.java +++ b/src/jalview/datamodel/features/FeatureStore.java @@ -232,6 +232,13 @@ public class FeatureStore // only construct nonPositionalFeatures or contactFeatures if needed } + /** + * Returns a new instance of IntervalStoreI of implementation as selected by + * the type parameter + * + * @param type + * @return + */ private IntervalStoreI getIntervalStore( IntervalStoreType type) { @@ -540,25 +547,29 @@ public class FeatureStore return result; } + /** + * Returns a (possibly empty) list of stored contact features + * + * @return + */ public List getContactFeatures() { - return getContactFeatures(new ArrayList<>()); + List result = new ArrayList<>(); + getContactFeatures(result); + return result; } /** - * Answers a list of all contact features. If there are none, returns an - * immutable empty list. + * Adds any stored contact features to the result list * * @return */ - public List getContactFeatures( - List result) + public void getContactFeatures(List result) { if (contactFeatureStarts != null) { result.addAll(contactFeatureStarts); } - return result; } /** -- 1.7.10.2