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

org.bidib.wizard.gateway.model.node.ProxyInterfaceNode Maven / Gradle / Ivy

There is a newer version: 2.0.30
Show newest version
package org.bidib.wizard.gateway.model.node;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ProxyInterfaceNode extends ProxyNode {
    private static final Logger LOGGER = LoggerFactory.getLogger(ProxyInterfaceNode.class);

    private static final long serialVersionUID = 1L;

    private int subNodeIndex;

    /**
     * Create a new interface node with the associated bidib node.
     * 
     * @param node
     *            the bidib node is mandatory
     * @throws IllegalArgumentException
     *             if the bidib node is null
     */
    public ProxyInterfaceNode(org.bidib.jbidibc.messages.Node node) {
        super(node);
    }

    // public int getSubNodeCount() {
    // LOGGER.info("Get the subnode count.");
    // return 1;
    // }

    public void resetSubNodeIndex() {
        subNodeIndex = 0;
    }

    public int getNextSubNodeIndex() {
        int subNodeIndex = this.subNodeIndex;

        this.subNodeIndex++;
        LOGGER.info("Return subNodeIndex : {}", subNodeIndex);
        return subNodeIndex;
    }

    @Override
    public boolean equals(Object other) {
        LOGGER.debug("equals, other: {}", other);
        if (other != null) {
            return other.hashCode() == hashCode();
        }
        return false;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy