From b86c8bf9c707ad0808996259ce487e641e064ddd Mon Sep 17 00:00:00 2001 From: Daniel Lasry Date: Sun, 20 Oct 2019 16:33:42 -0700 Subject: [PATCH] Fix BoardId java enum (#78) * fix BoardIds * additional fixes to BoardIds * one more fix --- .../src/main/java/brainflow/BoardIds.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/java-package/brainflow/src/main/java/brainflow/BoardIds.java b/java-package/brainflow/src/main/java/brainflow/BoardIds.java index f4e5eca0b..e47cd8ebb 100644 --- a/java-package/brainflow/src/main/java/brainflow/BoardIds.java +++ b/java-package/brainflow/src/main/java/brainflow/BoardIds.java @@ -14,29 +14,29 @@ public enum BoardIds { CYTON_WIFI_BOARD (5), CYTON_DAISY_WIFI_BOARD (6); - private final int exit_code; - private static final Map ec_map = new HashMap(); + private final int board_id; + private static final Map bi_map = new HashMap(); public int get_code () { - return exit_code; + return board_id; } public static String string_from_code (final int code) { return from_code (code).name (); } - public static ExitCode from_code (final int code) { - final ExitCode element = ec_map.get (code); + public static BoardIds from_code (final int code) { + final BoardIds element = bi_map.get (code); return element; } BoardIds(final int code) { - exit_code = code; + board_id = code; } static { - for (final ExitCode ec : ExitCode.values ()) { - ec_map.put(ec.get_code(), ec); + for (final BoardIds bi : BoardIds.values ()) { + bi_map.put(bi.get_code(), bi); } } }