@Test public void newIntColumn() throws Exception { IResourceLocation location = mock(IResourceLocation.class); CompatibleHistorySegment seg = spy(new CompatibleHistorySegment(location, mock(SwiftMetaData.class))); doReturn(false).when(seg).isReadable(); assertTrue(seg.newColumn(location, ClassType.INTEGER) instanceof IntColumn); doReturn(true).when(seg).isReadable(); IntColumn intColumn = mock(IntColumn.class); whenNew(IntColumn.class).withAnyArguments().thenReturn(intColumn); DetailColumn detailColumn = mock(DetailColumn.class); when(intColumn.getDetailColumn()).thenReturn(detailColumn); when(detailColumn.isReadable()).thenReturn(false); assertTrue(seg.newColumn(location, ClassType.INTEGER) instanceof ReadonlyNullColumn<?>); }
@Override protected Column<?> newColumn(IResourceLocation location, ClassType classType) { if (!isReadable()) { return super.newColumn(location, classType); } return newNullableColumn(location, classType); }
CompatibleHistorySegment extends CacheColumnSegment implements HistorySegment { @Override protected Column<?> newColumn(IResourceLocation location, ClassType classType) { if (!isReadable()) { return super.newColumn(location, classType); } return newNullableColumn(location, classType); } }
CompatibleHistorySegment extends CacheColumnSegment implements HistorySegment { @Override protected Column<?> newColumn(IResourceLocation location, ClassType classType) { if (!isReadable()) { return super.newColumn(location, classType); } return newNullableColumn(location, classType); } CompatibleHistorySegment(IResourceLocation parent, SwiftMetaData meta); }
CompatibleHistorySegment extends CacheColumnSegment implements HistorySegment { @Override protected Column<?> newColumn(IResourceLocation location, ClassType classType) { if (!isReadable()) { return super.newColumn(location, classType); } return newNullableColumn(location, classType); } CompatibleHistorySegment(IResourceLocation parent, SwiftMetaData meta); @Override ImmutableBitMap getAllShowIndex(); @Override void release(); }
CompatibleHistorySegment extends CacheColumnSegment implements HistorySegment { @Override protected Column<?> newColumn(IResourceLocation location, ClassType classType) { if (!isReadable()) { return super.newColumn(location, classType); } return newNullableColumn(location, classType); } CompatibleHistorySegment(IResourceLocation parent, SwiftMetaData meta); @Override ImmutableBitMap getAllShowIndex(); @Override void release();  }