@Test public void parseShouldReturnFloat() { Assert.assertSame(Float.class, new ConfigLoader().parse("1.1").getClass()); }
Object parse(String o) { Scanner s = new Scanner(o); if (s.hasNextInt()) return s.nextInt(); if (s.hasNextFloat()) return s.nextFloat(); if (s.hasNextBoolean()) return s.nextBoolean(); return o; }
ConfigLoader { Object parse(String o) { Scanner s = new Scanner(o); if (s.hasNextInt()) return s.nextInt(); if (s.hasNextFloat()) return s.nextFloat(); if (s.hasNextBoolean()) return s.nextBoolean(); return o; } }
ConfigLoader { Object parse(String o) { Scanner s = new Scanner(o); if (s.hasNextInt()) return s.nextInt(); if (s.hasNextFloat()) return s.nextFloat(); if (s.hasNextBoolean()) return s.nextBoolean(); return o; }  }
ConfigLoader { Object parse(String o) { Scanner s = new Scanner(o); if (s.hasNextInt()) return s.nextInt(); if (s.hasNextFloat()) return s.nextFloat(); if (s.hasNextBoolean()) return s.nextBoolean(); return o; }  void loadTo(Config config); Map<String, Object> loadFromYaml(); }
ConfigLoader { Object parse(String o) { Scanner s = new Scanner(o); if (s.hasNextInt()) return s.nextInt(); if (s.hasNextFloat()) return s.nextFloat(); if (s.hasNextBoolean()) return s.nextBoolean(); return o; }  void loadTo(Config config); Map<String, Object> loadFromYaml(); static final String YML_CONFIG_LOCATION; }