Tabnine Logo
OrgNodeInSet
Code IndexAdd Tabnine to your IDE (free)

How to use
OrgNodeInSet
in
com.orgzly.org.parser

Best Java code snippets using com.orgzly.org.parser.OrgNodeInSet (Showing top 5 results out of 315)

origin: orgzly/org-java

  private void calculateAndSetDescendantsCount(OrgNodeInSet node, int gap) {
    int n = (int) (node.getRgt() - node.getLft() - gap) / ( 2 * gap );

    node.setDescendantsCount(n);
  }
}
origin: orgzly/org-java

stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
nodeFromStack.setRgt(sequence);
calculateAndSetDescendantsCount(nodeFromStack, GAP);
listener.onNode(nodeFromStack);
stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
  OrgNodeInSet nodeFromStack = stack.peek();
  if (nodeFromStack.getLevel() >= thisNode.getLevel()) {
    stack.pop();
    nodeFromStack.setRgt(sequence);
    calculateAndSetDescendantsCount(nodeFromStack, GAP);
    listener.onNode(nodeFromStack);
stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
origin: orgzly/org-java

@Override
public void onNode(OrgNodeInSet node) {
  map.put(node.getLft(), node);
}
origin: orgzly/org-java

  @Override
  public void onFile(OrgFile file) throws IOException {
    /* Pop remaining nodes. */
    while (! stack.empty()) {
      OrgNodeInSet nodeFromStack = stack.pop();
      sequence += GAP;
      nodeFromStack.setRgt(sequence);
      calculateAndSetDescendantsCount(nodeFromStack, GAP);
      listener.onNode(nodeFromStack);
    }
    listener.onFile(file);
  }
});
origin: orgzly/org-java

stack.push(new OrgNodeInSet(STARTING_LEVEL, STARTING_VALUE, new OrgHead()));
      stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
      stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
      stack.push(new OrgNodeInSet(thisNode.getLevel(), sequence, thisNode.getHead()));
com.orgzly.org.parserOrgNodeInSet

Most used methods

  • getLft
  • <init>
  • getLevel
  • getRgt
  • setDescendantsCount
  • setRgt

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getContentResolver (Context)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • String (java.lang)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now