org.bidib.wizard.gateway.model.node.ProxyInterfaceNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-gateway Show documentation
Show all versions of bidibwizard-gateway Show documentation
jBiDiB BiDiB Wizard Gateway POM
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();
}
}