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

io.permazen.IndexInfo Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version

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

package io.permazen;

/**
 * Support superclass for information about an index.
 */
abstract class IndexInfo {

    final int storageId;

    IndexInfo(int storageId) {
        this.storageId = storageId;
    }

    /**
     * Get index storage info.
     *
     * @return index storage ID
     */
    public int getStorageId() {
        return this.storageId;
    }

// Object

    @Override
    public boolean equals(Object obj) {
        if (obj == this)
            return true;
        if (obj == null || obj.getClass() != this.getClass())
            return false;
        final IndexInfo that = (IndexInfo)obj;
        return this.storageId == that.storageId;
    }

    @Override
    public int hashCode() {
        return this.storageId;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy