@Override public <E> BerkeleyDbList<E> createList(final Class<E> valueType) throws IllegalStateException { final BerkeleyDbMap<Integer, E> map = createMap(Integer.class, valueType); // Berkeley StoredLists are non-functional! // return new StoredList<E>(createDatabase(), valueBinding, true); return new BerkeleyDbList<>(map); }
public RowAnnotation getAnnotation() { if (_annotation == null) { // only occurs for deserialized instances return RowAnnotations.getDefaultFactory().createAnnotation(); } return _annotation; }
public BooleanAnalyzerColumnDelegate(final RowAnnotationFactory annotationFactory) { _annotationFactory = annotationFactory; _nullAnnotation = _annotationFactory.createAnnotation(); _trueAnnotation = _annotationFactory.createAnnotation(); _falseAnnotation = _annotationFactory.createAnnotation(); }
@Override public void run(InputRow row, int distinctCount) { rowAnnotationFactory.annotate(row, distinctCount, rowAnnotation); }
@Override public int getNullCount() { if (_nullValueAnnotation == null) { return _nullCount; } return _nullValueAnnotation.getRowCount(); }
@Override public void transferAnnotations(final RowAnnotation from, final RowAnnotation to) { final RowAnnotationImpl fromImpl = (RowAnnotationImpl) from; final RowAnnotationImpl toImpl = (RowAnnotationImpl) to; toImpl.incrementRowCount(fromImpl.getRowCount()); fromImpl.resetRowCount(); }
@Override public final RowAnnotation createAnnotation() { return new RowAnnotationImpl(); }
@Override public RowAnnotationFactory createRowAnnotationFactory() { // TODO: Create a persistent RowAnnotationFactory return new InMemoryRowAnnotationFactory2(); } }
@Override public void annotate(final InputRow row, final RowAnnotation annotation) { final RowAnnotationImpl annotationImpl = (RowAnnotationImpl) annotation; annotationImpl.incrementRowCount(1); }
public BooleanAnalyzer(final InputColumn<Boolean>[] columns) { _columns = columns; _annotationFactory = RowAnnotations.getDefaultFactory(); }
@Override public RowAnnotationFactory createRowAnnotationFactory() { return RowAnnotations.getInMemoryFactory(_maxSampleSets, _maxSampleRecords); } }
@Override public void annotate(final InputRow row, final RowAnnotation annotation) { super.annotate(row, annotation); final Collection<InputRow> rowCollection = getInputRowCollection(10, annotation); if (rowCollection != null) { synchronized (rowCollection) { if (rowCollection.size() >= _maxSampleRecords) { return; } rowCollection.add(row); } } }
@Override public void resetAnnotation(final RowAnnotation annotation) { final RowAnnotationImpl annotationImpl = (RowAnnotationImpl) annotation; annotationImpl.resetRowCount(); }
@Override public void annotate(final InputRow row, final int distinctCount, final RowAnnotation annotation) { for (int i = 0; i < distinctCount; i++) { annotate(row, annotation); } }
@Override public int size() { return _wrappedMap.size(); }
@Override public <E> List<E> createList(final Class<E> valueType) throws IllegalStateException { return _collectionsStorageProvider.createList(valueType); }
@Override public <E> Set<E> createSet(final Class<E> valueType) throws IllegalStateException { return _collectionsStorageProvider.createSet(valueType); }
public Integer getNumBlank() { return _blankAnnotation.getRowCount(); } }
public static RowAnnotationFactory getInMemoryFactory(final int maxSampleSets, final int maxSampledRecords) { return new InMemoryRowAnnotationFactory2(maxSampleSets, maxSampledRecords); } }