From 4d1c023b4b94d3953452ae60204200b89f0d0513 Mon Sep 17 00:00:00 2001 From: Syd Logan Date: Mon, 9 Nov 2020 09:35:01 -0800 Subject: [PATCH] add API to get list of category names --- .../org/thousandsmiles/tscharts_lib/CDTCodesModelList.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/thousandsmiles/tscharts_lib/CDTCodesModelList.java b/app/src/main/java/org/thousandsmiles/tscharts_lib/CDTCodesModelList.java index b54afef..7438d93 100644 --- a/app/src/main/java/org/thousandsmiles/tscharts_lib/CDTCodesModelList.java +++ b/app/src/main/java/org/thousandsmiles/tscharts_lib/CDTCodesModelList.java @@ -32,6 +32,7 @@ public class CDTCodesModelList { private List m_list = new ArrayList(); private ArrayList m_objs = new ArrayList(); private ArrayList m_strs = new ArrayList(); + private ArrayList m_categories = new ArrayList(); public List getModel() { return m_list; @@ -48,6 +49,10 @@ public ArrayList getModelStrings() { return m_strs; } + public ArrayList getCategoryStrings() { + return m_categories; + } + private CDTCodesModelList(){} synchronized static public CDTCodesModelList getInstance() @@ -66,6 +71,7 @@ public boolean setModelData(JSONArray items) { try { CDTCodesModel model = new CDTCodesModel(items.getJSONObject(i), false); m_list.add(model); + m_categories.add(model.getCategory()); m_strs.add(model.repr()); } catch (Exception e) { ret = false;