public void PushActiveSetting(bool newSetting) { bool was = (bool)ActiveStack.Peek(); ActiveStack.Push(newSetting); if (was != newSetting) { NotifyEnabledChanged(); } }
//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); } } } }