io.deephaven.engine.table.impl.util.KeyHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.engine.table.impl.util;
import java.util.ArrayList;
public interface KeyHolder {
long getKey();
public long getPrevKey();
void setKey(long key);
void addDependent(KeyHolder dependent);
void removeDependent(KeyHolder dependent);
void touch();
public abstract class Base implements KeyHolder {
protected ArrayList dependents;
public void addDependent(KeyHolder dependent) {
if (dependents == null) {
dependents = new ArrayList(2);
}
dependents.add(dependent);
}
public void removeDependent(KeyHolder dependent) {
dependents.remove(dependent);
}
public void touch() {
if (dependents != null) {
for (KeyHolder dependent : dependents) {
dependent.touch();
}
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy