public boolean isEnabled(){
  return (!portStateLinkDown && !config.contains(OFPortConfig.OFPPC_PORT_DOWN));
}

public boolean isEnabled ( ) { return ( ! portStateLinkDown && ! config . contains ( OFPortConfig . OFPPC_PORT_DOWN ) ) ; }
returns true if the port is up , i . e . , it ' s neither administratively down nor link down . it currently does not take stp state into consideration
