changed to examplePutAndGet

This commit is contained in:
Rob Austin
2020-03-26 08:54:46 +00:00
parent a17a3399aa
commit 8a1bcc2a7d
@@ -28,7 +28,7 @@ public class StringArrayExample {
}
@Test
public void simpleLoggingTest() {
public void examplePutAndGet() {
ChronicleMap<Integer, CharSequenceArray> map = ChronicleMapBuilder
.of(Integer.class, CharSequenceArray.class)
.entries(100)
@@ -38,12 +38,12 @@ public class StringArrayExample {
map.put(1, charSequenceArray);
}
{
// change the value in the array
// compute - change the value in the array
map.compute(1, this::setToHello);
}
{
// read the value
// get - read the value
CharSequence charSequence = map.getUsing(1, charSequenceArray).getCharSequenceWrapperAt(1).getCharSequence();
System.out.println(charSequence);
}