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

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

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

Stack.addElement介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Pushes the specified object onto the top of the stack.
 *
 * @param object
 *            The object to be added on top of the stack.
 * @return the object argument.
 * @see #peek
 * @see #pop
 */
public E push(E object) {
  addElement(object);
  return object;
}

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

/** Create an XPath from some steps. steps.lenght must be >= 1 */
private XPath(boolean isAbsolute, Step[] steps) {
 for (int i = 0; i < steps.length; ++i)
  steps_.addElement(steps[i]);
 absolute_ = isAbsolute;
 string_ = null;
}

代码示例来源:origin: MobiVM/robovm

/**
 * Pushes the specified object onto the top of the stack.
 *
 * @param object
 *            The object to be added on top of the stack.
 * @return the object argument.
 * @see #peek
 * @see #pop
 */
public E push(E object) {
  addElement(object);
  return object;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Pushes the specified object onto the top of the stack.
 *
 * @param object
 *            The object to be added on top of the stack.
 * @return the object argument.
 * @see #peek
 * @see #pop
 */
public E push(E object) {
  addElement(object);
  return object;
}

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

/** Create an XPath from some steps. steps.lenght must be >= 1 */
private XPath(boolean isAbsolute, Step[] steps) {
 for (int i = 0; i < steps.length; ++i)
  steps_.addElement(steps[i]);
 absolute_ = isAbsolute;
 string_ = null;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Pushes the specified object onto the top of the stack.
 *
 * @param object
 *            The object to be added on top of the stack.
 * @return the object argument.
 * @see #peek
 * @see #pop
 */
public E push(E object) {
  addElement(object);
  return object;
}

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

/**
 * Push the current state onto the state stack.
 */
private void pushState()
{
  stateStack.addElement(curLexState);
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

public void pushError(Throwable e)
{
  errorStack.addElement(e);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Pushes the specified object onto the top of the stack.
 *
 * @param object
 *            The object to be added on top of the stack.
 * @return the object argument.
 * @see #peek
 * @see #pop
 */
public E push(E object) {
  addElement(object);
  return object;
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-spi-commons

/**
 * Push the current state onto the state stack.
 */
private void pushState()
{
 // System.err.println("pushing: "+curLexState); printLinePos();
 stateStack.addElement(new Integer(curLexState));
}

代码示例来源:origin: org.xmlbeam/xmlprojector

/**
 * Push the current state onto the state stack.
 */
private void pushState()
{
  stateStack.addElement(new Integer(curLexState));
}

代码示例来源:origin: apache/jackrabbit

/**
 * Push the current state onto the state stack.
 */
private void pushState()
{
 // System.err.println("pushing: "+curLexState); printLinePos();
 stateStack.addElement(new Integer(curLexState));
}

代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-enhancer

private final void copyStack(Stack fromStack, Stack toStack) {
  while (!toStack.empty())
    toStack.pop();
  // take advantage of Stack's inheritance from Vector
  for (int i=0; i<fromStack.size(); i++)
    toStack.addElement(fromStack.elementAt(i));
}

代码示例来源:origin: org.apache.airavata/messenger-commons

public synchronized void free(Connection connection) {
  busyConnections.removeElement(connection);
  availableConnections.addElement(connection);
  // Wake up threads that are waiting for a connection
  notifyAll();
}

代码示例来源:origin: org.apache.airavata/airavata-registry-service

public synchronized void free(Connection connection) {
  busyConnections.removeElement(connection);
  availableConnections.addElement(connection);
  // Wake up threads that are waiting for a connection
  notifyAll();
}

代码示例来源:origin: org.apache.airavata/airavata-api-server

public synchronized void free(Connection connection) {
  busyConnections.removeElement(connection);
  availableConnections.addElement(connection);
  // Wake up threads that are waiting for a connection
  notifyAll();
}

代码示例来源:origin: org.apache.airavata/airavata-messenger-commons

public synchronized void free(Connection connection) {
  busyConnections.removeElement(connection);
  availableConnections.addElement(connection);
  // Wake up threads that are waiting for a connection
  notifyAll();
}

代码示例来源:origin: com.l2fprod.common/l2fprod-common-directorychooser

public void add(WindowsDirectoryChooserUI.FileTreeNode node, JTree tree) {
 if (!isAlive()) {
  throw new IllegalArgumentException("Queue is no longer alive");
 }
 synchronized (lock) {
  if (running) {
   nodes.addElement(new QueueItem(node, tree));
   lock.notifyAll();
  }
 }
}

代码示例来源:origin: secure-software-engineering/soot-infoflow

public void concreteWriteReadStackGetTest() {
  String tainted = TelephonyManager.getDeviceId();
  Stack<String> stack = new Stack<String>();
  stack.addElement("neutral");
  stack.push(tainted);
  String taintedElement2 = stack.get(0);
  ConnectionManager cm = new ConnectionManager();
  cm.publish(taintedElement2);
}

代码示例来源:origin: secure-software-engineering/soot-infoflow

public void concreteWriteReadStackPeekTest() {
  String tainted = TelephonyManager.getDeviceId();
  Stack<String> stack = new Stack<String>();
  stack.addElement("neutral");
  stack.push(tainted);
  String taintedElement = stack.peek();
  ConnectionManager cm = new ConnectionManager();
  cm.publish(taintedElement);
}

相关文章