@@ -0,0 +1,2170 @@
+package org.team2471.frc.lib.dashboard;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport edu.wpi.first.wpilibj.Preferences;%0Aimport edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;%0Aimport edu.wpi.first.wpilibj.tables.TableKeyNotDefinedException;%0A%0A// It's smarter because it remembers %E2%98%9C(%EF%BE%9F%E3%83%AE%EF%BE%9F%E2%98%9C) (%E2%98%9E%EF%BE%9F%E3%83%AE%EF%BE%9F)%E2%98%9E%0Apublic class SmarterDashboard %7B%0A  private static final Preferences prefs = Preferences.getInstance();%0A  private static final Map%3CString, Boolean%3E booleanCache = new HashMap%3C%3E();%0A  private static final Map%3CString, Double%3E numberCache = new HashMap%3C%3E();%0A  private static final Map%3CString, String%3E stringCache = new HashMap%3C%3E();%0A%0A  public static boolean getBoolean(String key, boolean fallback) %7B%0A    boolean value;%0A%0A    try %7B%0A      value = SmartDashboard.getBoolean(key);%0A    %7D catch (TableKeyNotDefinedException ignored) %7B%0A      value = prefs.getBoolean(key, fallback);%0A      SmartDashboard.putBoolean(key, value);%0A    %7D%0A%0A    booleanCache.put(key, value);%0A    return value;%0A  %7D%0A%0A  public static double getNumber(String key, double fallback) %7B%0A    double value;%0A%0A    try %7B%0A      value = SmartDashboard.getNumber(key);%0A    %7D catch (TableKeyNotDefinedException ignored) %7B%0A      value = prefs.getDouble(key, fallback);%0A      SmartDashboard.putNumber(key, value);%0A    %7D%0A%0A    numberCache.put(key, value);%0A    return value;%0A  %7D%0A%0A  public static String getString(String key, String fallback) %7B%0A    String value;%0A%0A    try %7B%0A      value = SmartDashboard.getString(key);%0A    %7D catch (TableKeyNotDefinedException ignored) %7B%0A      value = prefs.getString(key, fallback);%0A      SmartDashboard.putString(key, value);%0A    %7D%0A%0A    stringCache.put(key, value);%0A    return value;%0A  %7D%0A%0A  public static void putBoolean(String key, boolean value) %7B%0A    SmartDashboard.putBoolean(key, value);%0A  %7D%0A%0A  public static void putNumber(String key, double value) %7B%0A    SmartDashboard.putNumber(key, value);%0A  %7D%0A%0A  public static void putString(String key, String value) %7B%0A    SmartDashboard.putString(key, value);%0A  %7D%0A%0A  public static void updatePrefs() %7B%0A    booleanCache.forEach(prefs::putBoolean);%0A    numberCache.forEach(prefs::putDouble);%0A    stringCache.forEach(prefs::putString);%0A  %7D%0A%7D%0A

Add SmarterDashboard