java.util.Stack.elements()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(136)

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

Stack.elements介绍

暂无

代码示例

代码示例来源:origin: belerweb/pinyin4j

public Enumeration getSteps() {
 return steps_.elements();
}

代码示例来源:origin: belerweb/pinyin4j

/** A one-level clone in which the steps list is cloned but not the steps objects themselves.
 * It is OK for different XPaths to share Steps because they are immutable. */
public Object clone() {
 Step[] steps = new Step[steps_.size()];
 Enumeration step = steps_.elements();
 for (int i = 0; i < steps.length; ++i)
  steps[i] = (Step) step.nextElement();
 return new XPath(absolute_, steps);
}

代码示例来源:origin: belerweb/pinyin4j

private String generateString() {
 StringBuffer result = new StringBuffer();
 boolean first = true;
 for (Enumeration i = steps_.elements(); i.hasMoreElements();) {
  Step step = (Step) i.nextElement();
  if (!first || absolute_) {
   result.append('/');
   if (step.isMultiLevel()) result.append('/');
  }
  result.append(step.toString());
  first = false;
 }
 return result.toString();
}

代码示例来源:origin: com.belerweb/pinyin4j

public Enumeration getSteps() {
 return steps_.elements();
}

代码示例来源:origin: info.magnolia/magnolia-rendering

@Override
public AreaDefinition getParentAreaDefinition() {
  if (currentRenderableDefinition instanceof AreaDefinition) {
    return (AreaDefinition) currentRenderableDefinition;
  }
  Enumeration<StackState> elements = stack.elements();
  while (elements.hasMoreElements()) {
    StackState state = elements.nextElement();
    if (state.renderableDefinition instanceof AreaDefinition) {
      return (AreaDefinition) state.renderableDefinition;
    }
  }
  return null;
}

代码示例来源:origin: open-eid/digidoc4j

private boolean findTagOnStack(String tag)
{
  java.util.Enumeration eTags = m_tags.elements();
  while(eTags.hasMoreElements()) {
    String t2 = (String)eTags.nextElement();
    if(t2.equals(tag))
      return true;
  }
  return false;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

private String getContextClassName() {
  String contextClassName = null;
  Enumeration<DefinitionScope> elements = scopes.elements();
  while (elements.hasMoreElements()) {
    DefinitionScope nextElement = elements.nextElement();
    if (nextElement.enclosingClass != null) {
      contextClassName = nextElement.enclosingClass.getName();
    }
  }
  return contextClassName;
}

代码示例来源:origin: org.jboss/jboss-common-core

/**
 * Are we in an extension namespace?
 *
 * @return true if the current stack of open namespaces includes
 *               an extension namespace.
 */
protected boolean inExtensionNamespace() {
 boolean inExtension = false;
 Enumeration elements = namespaceStack.elements();
 while (!inExtension && elements.hasMoreElements()) {
  String ns = (String) elements.nextElement();
  if (ns == null) {
 inExtension = true;
  } else {
 inExtension = (!ns.equals(tr9401NamespaceName)
       && !ns.equals(namespaceName));
  }
 }
 return inExtension;
}

代码示例来源:origin: com.belerweb/pinyin4j

/** A one-level clone in which the steps list is cloned but not the steps objects themselves.
 * It is OK for different XPaths to share Steps because they are immutable. */
public Object clone() {
 Step[] steps = new Step[steps_.size()];
 Enumeration step = steps_.elements();
 for (int i = 0; i < steps.length; ++i)
  steps[i] = (Step) step.nextElement();
 return new XPath(absolute_, steps);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

private String getContextSuperClassName() {
  String contextClassName = null;
  Enumeration<DefinitionScope> elements = scopes.elements();
  while (elements.hasMoreElements()) {
    DefinitionScope nextElement = elements.nextElement();
    if (nextElement.enclosingClass != null && nextElement.enclosingClass.superClass != null) {
      contextClassName = nextElement.enclosingClass.superClass.getName();
    }
  }
  return contextClassName;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

/**
 * Are we in an extension namespace?
 *
 * @return true if the current stack of open namespaces includes
 *               an extension namespace.
 */
protected boolean inExtensionNamespace() {
 boolean inExtension = false;
 Enumeration elements = namespaceStack.elements();
 while (!inExtension && elements.hasMoreElements()) {
  String ns = (String) elements.nextElement();
  if (ns == null) {
 inExtension = true;
  } else {
 inExtension = (!ns.equals(tr9401NamespaceName)
       && !ns.equals(namespaceName));
  }
 }
 return inExtension;
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Are we in an extension namespace?
 *
 * @return true if the current stack of open namespaces includes
 *               an extension namespace.
 */
protected boolean inExtensionNamespace() {
 boolean inExtension = false;
 Enumeration elements = namespaceStack.elements();
 while (!inExtension && elements.hasMoreElements()) {
  String ns = (String) elements.nextElement();
  if (ns == null) {
 inExtension = true;
  } else {
 inExtension = (!ns.equals(tr9401NamespaceName)
       && !ns.equals(namespaceName));
  }
 }
 return inExtension;
}

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

/**
 * Are we in an extension namespace?
 *
 * @return true if the current stack of open namespaces includes
 *               an extension namespace.
 */
protected boolean inExtensionNamespace() {
 boolean inExtension = false;
 Enumeration elements = namespaceStack.elements();
 while (!inExtension && elements.hasMoreElements()) {
  String ns = (String) elements.nextElement();
  if (ns == null) {
 inExtension = true;
  } else {
 inExtension = (!ns.equals(tr9401NamespaceName)
       && !ns.equals(namespaceName));
  }
 }
 return inExtension;
}

代码示例来源:origin: com.sun.org.apache.xml.internal/resolver

/**
 * Are we in an extension namespace?
 *
 * @return true if the current stack of open namespaces includes
 *               an extension namespace.
 */
protected boolean inExtensionNamespace() {
 boolean inExtension = false;
 Enumeration elements = namespaceStack.elements();
 while (!inExtension && elements.hasMoreElements()) {
  String ns = (String) elements.nextElement();
  if (ns == null) {
 inExtension = true;
  } else {
 inExtension = (!ns.equals(tr9401NamespaceName)
       && !ns.equals(namespaceName));
  }
 }
 return inExtension;
}

代码示例来源:origin: com.tngtech.java/property-loader

private void throwIfRecursionInIncludes(String fileName) {
  if (fileNameStack.contains(fileName)) {
    StringBuilder sb = propertyLoaderFactory.getStringBuilder();
    sb.append("property file include recursion: ");
    Enumeration<String> elements = fileNameStack.elements();
    while (elements.hasMoreElements()) {
      String currentFileName = elements.nextElement();
      sb.append(currentFileName);
      sb.append(" -> ");
    }
    sb.append(fileName);
    throw new PropertyLoaderException(sb.toString());
  }
}

代码示例来源:origin: com.belerweb/pinyin4j

private String generateString() {
 StringBuffer result = new StringBuffer();
 boolean first = true;
 for (Enumeration i = steps_.elements(); i.hasMoreElements();) {
  Step step = (Step) i.nextElement();
  if (!first || absolute_) {
   result.append('/');
   if (step.isMultiLevel()) result.append('/');
  }
  result.append(step.toString());
  first = false;
 }
 return result.toString();
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu

Enumeration entities = entityStack.elements();
while (entities.hasMoreElements()) {
 String e = (String) entities.nextElement();

代码示例来源:origin: org.apache.cocoon/cocoon-pipeline-components

Enumeration enumeration = ancestors.elements();
while (enumeration.hasMoreElements()) {
  resolver.release((Source) enumeration.nextElement());

相关文章