Elements.size
Code IndexAdd Codota to your IDE (free)

Best code snippets using nu.xom.Elements.size(Showing top 15 results out of 315)

  • Common ways to obtain Elements
private void myMethod () {
Elements e =
  • Element element;element.getChildElements(str)
  • Element element;element.getChildElements()
  • Smart code suggestions by Codota
}
origin: stanfordnlp/CoreNLP

List<CoreMap> sentences = new ArrayList<>();
Elements sentenceElements = textElem.getChildElements("SENT");
for (int crtsent = 0; crtsent < sentenceElements.size(); crtsent ++){
 Element sentElem = sentenceElements.get(crtsent);
 CoreMap sentence = new ArrayCoreMap();
origin: com.thoughtworks.xstream/xstream

  public String peekNextChild() {
    Elements children = currentElement.getChildElements();
    if (null == children || children.size() == 0) {
      return null;
    }
    return decodeNode(children.get(0).getLocalName());
  }
}
origin: com.thoughtworks.xstream/xstream

protected int getChildCount() {
  return currentElement.getChildElements().size();
}
origin: org.xml-cml/cmlxom

private List<CMLLength> makeLengthList(CMLElement element) {
  Elements lengthElements = element.getChildCMLElements(CMLLength.TAG);
  List<CMLLength> lengthList = new ArrayList<CMLLength>();
  for (int i = 0; i < lengthElements.size(); i++) {
    lengthList.add((CMLLength)lengthElements.get(i));
  }
  if (lengthList.size() == 0) {
    throw new RuntimeException("no length elements in ZMatrix");
  }
  return lengthList;
}
origin: org.concordion/concordion

  private boolean hasContentTypeMetadata(Element head) {
    Elements metaChildren = head.getChildElements("meta");
    for (int i=0; i < metaChildren.size(); i++) {
      Element metaChild = metaChildren.get(i);
      Attribute httpEquiv = metaChild.getAttribute("http-equiv");
      if (httpEquiv != null && "content-type".equalsIgnoreCase(httpEquiv.getValue())) {
        return true;
      }
    }
    return false;
  }
}
origin: org.xml-cml/cmlxom

private static double getWeight(Element element, String source) {
  Elements weights = element.getChildElements("mass");
  for (int i = 0; i < weights.size(); i++) {
    Element weight = (Element) weights.get(i);
    if (source != null
        && source.equals(weight.getAttributeValue("source"))) {
      return Double.parseDouble(weight.getValue());
    }
  }
  return 0;
}
origin: org.xml-cml/cmlxom

/** get the first child scalar if any.
 *
 * @return the scalar
 */
public CMLScalar getScalar() {
  Elements scalars = this.getChildCMLElements(CMLScalar.TAG);
  return (scalars == null || scalars.size() == 0) ?
    null : (CMLScalar) scalars.get(0);
}
origin: org.xml-cml/cmlxom

/**
 * convenience method to get Element child count. avoid having to specify
 * namespaces.
 * 
 * @param name
 *            local CML name
 * @return the count of that type or null
 */
public int getCMLChildCount(String name) {
  Elements childElements = getChildCMLElements(name);
  return childElements.size();
}
origin: org.concordion/concordion

private Element[] wrapXomElements(Elements xomElements) {
  int count = xomElements.size();
  Element[] elements = new Element[count];
  for (int i = 0; i < count; i++) {
    elements[i] = new Element(xomElements.get(i));
  }
  return elements;
}
origin: org.xml-cml/cmlxom

static CMLMolecule getMoleculeX(CMLElement element) {
  CMLMolecule molecule = null;
  Elements moleculeChildElements = element
      .getChildCMLElements(CMLMolecule.TAG);
  if (moleculeChildElements.size() == 1) {
    molecule = (CMLMolecule) moleculeChildElements.get(0);
  }
  return molecule;
}
origin: org.jvnet.hudson/xstream

public String peekNextChild() {
  Elements children = currentElement.getChildElements();
  if(children.size()==0)  return null;
  return unescapeXmlName(children.get(0).getLocalName());
}
origin: x-stream/xstream

  @Override
  public String peekNextChild() {
    final Elements children = currentElement.getChildElements();
    if (null == children || children.size() == 0) {
      return null;
    }
    return decodeNode(children.get(0).getLocalName());
  }
}
origin: org.concordion/concordion

private Element[] wrapXomElements(Elements xomElements) {
  int count = xomElements.size();
  Element[] elements = new Element[count];
  for (int i = 0; i < count; i++) {
    elements[i] = new Element(xomElements.get(i));
  }
  return elements;
}
origin: org.concordion/concordion

  private boolean hasContentTypeMetadata(Element head) {
    Elements metaChildren = head.getChildElements("meta");
    for (int i=0; i < metaChildren.size(); i++) {
      Element metaChild = metaChildren.get(i);
      Attribute httpEquiv = metaChild.getAttribute("http-equiv");
      if (httpEquiv != null && "content-type".equalsIgnoreCase(httpEquiv.getValue())) {
        return true;
      }
    }
    return false;
  }
}
origin: org.hudsonci.tools/xstream

  public String peekNextChild() {
    Elements children = currentElement.getChildElements();
    if (null == children || children.size() == 0) {
      return null;
    }
    return decodeNode(children.get(0).getLocalName());
  }
}
nu.xomElementssize

Javadoc

Returns the number of elements in the list. This is guaranteed non-negative.

Popular methods of Elements

  • get
    Returns the indexth element in the list. The first element has index 0. The last element has index
  • <init>
  • add

Popular classes and methods

  • runOnUiThread (Activity)
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedList (java.util)
    Linked list implementation. [Sun docs] [http://java.sun.com/j2se/1.5.0/docs/api/java/util/LinkedList
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)