abstract_trie_node.d.ts 943 B

12345678910111213141516171819202122232425
  1. import { SpeechRule } from '../rule_engine/speech_rule.js';
  2. import { TrieNode, TrieNodeKind } from './trie_node.js';
  3. export declare class AbstractTrieNode<T> implements TrieNode {
  4. constraint: string;
  5. test: ((p1: T) => boolean) | null;
  6. kind: TrieNodeKind;
  7. private children_;
  8. constructor(constraint: string, test: ((p1: T) => boolean) | null);
  9. getConstraint(): string;
  10. getKind(): TrieNodeKind;
  11. applyTest(object: T): boolean;
  12. addChild(node: TrieNode): TrieNode;
  13. getChild(constraint: string): TrieNode;
  14. getChildren(): TrieNode[];
  15. findChildren(object: T): TrieNode[];
  16. removeChild(constraint: string): void;
  17. toString(): string;
  18. }
  19. export declare class StaticTrieNode extends AbstractTrieNode<Node> {
  20. private rule_;
  21. constructor(constraint: string, test: ((p1: Element) => boolean) | null);
  22. getRule(): SpeechRule | null;
  23. setRule(rule: SpeechRule): void;
  24. toString(): string;
  25. }