Example usage for java.util Stack clone

List of usage examples for java.util Stack clone

Introduction

In this page you can find the example usage for java.util Stack clone.

Prototype

@HotSpotIntrinsicCandidate
protected native Object clone() throws CloneNotSupportedException;

Source Link

Document

Creates and returns a copy of this object.

Usage

From source file:com.taobao.tdhs.jdbc.sqlparser.ParseSQL.java

public boolean checkRealEqual(Stack<String> stack) {
    logger.debug("checkRealEqual:" + stack.toString());
    String tmp_str = "";
    @SuppressWarnings("unchecked")
    Stack<String> tmpStack = (Stack<String>) stack.clone();
    while (tmpStack.isEmpty() == false) {
        tmp_str = tmpStack.pop() + tmp_str;
    }/*from w  ww.jav  a  2  s. com*/

    //?',?,?,value
    boolean result = !checkSpecialStr(tmp_str, "'");
    logger.debug(result ? "=?" : "?=?");
    return result;
}