All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.permazen.core.CollectionElementStorageInfo Maven / Gradle / Ivy


/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package io.permazen.core;

import java.util.Collection;
import java.util.Set;
import java.util.function.Predicate;

abstract class CollectionElementStorageInfo, E, P extends CollectionField>
  extends ComplexSubFieldStorageInfo {

    CollectionElementStorageInfo(P field) {
        super(field.elementField, field);
    }

    @Override
    void readAllNonNull(Transaction tx, ObjId id, Set values, Predicate filter) {
        for (E value : this.parentRepresentative.getValueInternal(tx, id)) {
            if (value != null && (filter == null || filter.test(value)))
                values.add(value);
        }
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy