org.apache.abdera.model.Element.getNextSibling()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(234)

本文整理了Java中org.apache.abdera.model.Element.getNextSibling()方法的一些代码示例,展示了Element.getNextSibling()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getNextSibling()方法的具体详情如下:
包路径:org.apache.abdera.model.Element
类名称:Element
方法名:getNextSibling

Element.getNextSibling介绍

[英]Get the element following this one
[中]获取下面的元素

代码示例

代码示例来源:origin: org.apache.abdera/abdera-core

  1. public <T extends Element> T getNextSibling() {
  2. return (T)internal.getNextSibling();
  3. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera

  1. @SuppressWarnings("unchecked")
  2. public <T extends Element> T getNextSibling() {
  3. return (T) internal.getNextSibling();
  4. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera

  1. @SuppressWarnings("unchecked")
  2. public <T extends Element> T getNextSibling(QName qname) {
  3. return (T) internal.getNextSibling(qname);
  4. }

代码示例来源:origin: org.apache.abdera/abdera-core

  1. public <T extends Element> T getNextSibling(QName qname) {
  2. return (T)internal.getNextSibling(qname);
  3. }

代码示例来源:origin: org.apache.abdera/abdera-parser

  1. public <T extends Element> T getNextSibling(QName qname) {
  2. Element el = getNextSibling();
  3. while (el != null) {
  4. OMElement omel = (OMElement)el;
  5. if (omel.getQName().equals(qname))
  6. return (T)getWrapped((Element)omel);
  7. el = el.getNextSibling();
  8. }
  9. return null;
  10. }

代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite

  1. @Override
  2. protected void runTest() throws Throwable {
  3. Feed feed = abdera.getFactory().newFeed();
  4. Entry entry = feed.addEntry();
  5. Element addedChild = addChild(feed);
  6. Element child = feed.getFirstChild();
  7. // Entries must come after any other type of child elements
  8. assertThat(child).isSameAs(addedChild);
  9. assertThat(child.getNextSibling()).isSameAs(entry);
  10. }

代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite

  1. @Override
  2. protected void runTest() throws Throwable {
  3. Person person = abdera.getFactory().newContributor();
  4. person.setEmail("info@example.com");
  5. Element child = person.getFirstChild();
  6. assertThat(child).isNotNull();
  7. assertThat(child.getText()).isEqualTo("info@example.com");
  8. person.setEmail("webmaster@example.com");
  9. child = person.getFirstChild();
  10. assertThat(child).isNotNull();
  11. assertThat(child.getText()).isEqualTo("webmaster@example.com");
  12. assertThat(child.getNextSibling()).isNull();
  13. person.setEmail(null);
  14. assertThat(person.getFirstChild()).isNull();
  15. }
  16. }

相关文章