congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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