//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void clear() throws org.maltparser.core.exception.MaltChainedException public override void clear() { // dependencyGraph.clear(); ActiveStack.Clear(); InactiveStack.Clear(); input.Clear(); historyNode = null; }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } TwoPlanarConfig that = (TwoPlanarConfig)obj; if (ActiveStack.Count != that.ActiveStack.Count) { return(false); } if (InactiveStack.Count != that.InactiveStack.Count) { return(false); } if (input.Count != that.Input.Count) { return(false); } if (dependencyGraph.NEdges() != that.DependencyGraph.NEdges()) { return(false); } for (int i = 0; i < ActiveStack.Count; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: if (ActiveStack.get(i).Index != that.ActiveStack.get(i).Index) { return(false); } } for (int i = 0; i < InactiveStack.Count; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: if (InactiveStack.get(i).Index != that.InactiveStack.get(i).Index) { return(false); } } for (int i = 0; i < input.Count; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: if (input.get(i).Index != that.Input.get(i).Index) { return(false); } } return(dependencyGraph.Edges.Equals(that.DependencyGraph.Edges)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void initialize() throws org.maltparser.core.exception.MaltChainedException public override void initialize() { ActiveStack.Push(dependencyGraph.DependencyRoot); InactiveStack.Push(dependencyGraph.DependencyRoot); for (int i = dependencyGraph.HighestTokenIndex; i > 0; i--) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.maltparser.core.syntaxgraph.node.DependencyNode node = dependencyGraph.getDependencyNode(i); DependencyNode node = dependencyGraph.GetDependencyNode(i); if (node != null) { input.Push(node); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void initialize(org.maltparser.parser.ParserConfiguration parserConfiguration) throws org.maltparser.core.exception.MaltChainedException public virtual void initialize(ParserConfiguration parserConfiguration) { if (parserConfiguration != null) { TwoPlanarConfig planarConfig = (TwoPlanarConfig)parserConfiguration; activeStack = planarConfig.activeStack; Stack <DependencyNode> sourceActiveStack = planarConfig.ActiveStack; Stack <DependencyNode> sourceInactiveStack = planarConfig.InactiveStack; Stack <DependencyNode> sourceInput = planarConfig.Input; DependencyGraph = planarConfig.DependencyGraph; for (int i = 0, n = sourceActiveStack.Count; i < n; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: ActiveStack.Push(dependencyGraph.GetDependencyNode(sourceActiveStack.get(i).Index)); } for (int i = 0, n = sourceInactiveStack.Count; i < n; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: InactiveStack.Push(dependencyGraph.GetDependencyNode(sourceInactiveStack.get(i).Index)); } for (int i = 0, n = sourceInput.Count; i < n; i++) { //JAVA TO C# CONVERTER TODO TASK: There is no direct .NET Stack equivalent to Java Stack methods based on internal indexing: input.Push(dependencyGraph.GetDependencyNode(sourceInput.get(i).Index)); } } else { ActiveStack.Push(dependencyGraph.DependencyRoot); InactiveStack.Push(dependencyGraph.DependencyRoot); for (int i = dependencyGraph.HighestTokenIndex; i > 0; i--) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.maltparser.core.syntaxgraph.node.DependencyNode node = dependencyGraph.getDependencyNode(i); DependencyNode node = dependencyGraph.GetDependencyNode(i); if (node != null) { input.Push(node); } } } }