@Test public void testStartsEmpty() { PersonStore store = new PersonStore(new StoreConfig(), ticker); assertThat(store.getAll()).isEmpty(); }
public Collection<StoreEntry> getAll() { Builder<StoreEntry> builder = ImmutableList.builder(); for (Entry<String, Person> entry : persons.entrySet()) { builder.add(new AutoValue_PersonStore_StoreEntry(entry.getKey(), entry.getValue())); } return builder.build(); }
PersonStore { public Collection<StoreEntry> getAll() { Builder<StoreEntry> builder = ImmutableList.builder(); for (Entry<String, Person> entry : persons.entrySet()) { builder.add(new AutoValue_PersonStore_StoreEntry(entry.getKey(), entry.getValue())); } return builder.build(); } }
PersonStore { public Collection<StoreEntry> getAll() { Builder<StoreEntry> builder = ImmutableList.builder(); for (Entry<String, Person> entry : persons.entrySet()) { builder.add(new AutoValue_PersonStore_StoreEntry(entry.getKey(), entry.getValue())); } return builder.build(); } @Inject  PersonStore(StoreConfig config, Ticker ticker); }
PersonStore { public Collection<StoreEntry> getAll() { Builder<StoreEntry> builder = ImmutableList.builder(); for (Entry<String, Person> entry : persons.entrySet()) { builder.add(new AutoValue_PersonStore_StoreEntry(entry.getKey(), entry.getValue())); } return builder.build(); } @Inject  PersonStore(StoreConfig config, Ticker ticker); @Flatten PersonStoreStats getStats(); Person get(String id); boolean put(String id, Person person); boolean delete(String id); Collection<StoreEntry> getAll(); }
PersonStore { public Collection<StoreEntry> getAll() { Builder<StoreEntry> builder = ImmutableList.builder(); for (Entry<String, Person> entry : persons.entrySet()) { builder.add(new AutoValue_PersonStore_StoreEntry(entry.getKey(), entry.getValue())); } return builder.build(); } @Inject  PersonStore(StoreConfig config, Ticker ticker); @Flatten PersonStoreStats getStats(); Person get(String id); boolean put(String id, Person person); boolean delete(String id); Collection<StoreEntry> getAll();  }