@Test public void testMultipleGets() { FractionList l1 = FractionList.get(); FractionList l2 = FractionList.get(); FractionList l3 = FractionList.get(); assertThat(l1).isNotNull(); assertThat(l1).isSameAs(l2); assertThat(l2).isSameAs(l3); }
public static FractionList get() { return INSTANCE.updateAndGet(old -> old != null ? old : new FractionList()); }
FractionList { public static FractionList get() { return INSTANCE.updateAndGet(old -> old != null ? old : new FractionList()); } }
FractionList { public static FractionList get() { return INSTANCE.updateAndGet(old -> old != null ? old : new FractionList()); } private  FractionList(); }
FractionList { public static FractionList get() { return INSTANCE.updateAndGet(old -> old != null ? old : new FractionList()); } private  FractionList(); static FractionList get(); Collection<FractionDescriptor> getFractionDescriptors(); FractionDescriptor getFractionDescriptor(final String groupId, final String artifactId); }
FractionList { public static FractionList get() { return INSTANCE.updateAndGet(old -> old != null ? old : new FractionList()); } private  FractionList(); static FractionList get(); Collection<FractionDescriptor> getFractionDescriptors(); FractionDescriptor getFractionDescriptor(final String groupId, final String artifactId);  }