本文整理了Java中java.util.Stack.clear()
方法的一些代码示例,展示了Stack.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stack.clear()
方法的具体详情如下:
包路径:java.util.Stack
类名称:Stack
方法名:clear
暂无
代码示例来源:origin: org.mockito/mockito-core
public void reset() {
matcherStack.clear();
}
代码示例来源:origin: google/j2objc
public void reset() {
matcherStack.clear();
}
}
代码示例来源:origin: RobotiumTech/robotium
/**
* Clears the activity stack.
*/
private void clearActivityStack(){
activityStack.clear();
activitiesStoredInActivityStack.clear();
}
代码示例来源:origin: oracle/opengrok
/**
* Clears the instance stack.
*/
protected void clearStack() {
stack.clear();
}
}
代码示例来源:origin: apache/hive
private synchronized void addTableNamesForPrewarming(List<String> tblNames) {
tableNames.clear();
if (tblNames != null) {
tableNames.addAll(tblNames);
}
}
代码示例来源:origin: google/j2objc
public List<LocalizedMatcher> pullLocalizedMatchers() {
if (matcherStack.isEmpty()) {
return Collections.emptyList();
}
List<LocalizedMatcher> matchers = new ArrayList<LocalizedMatcher>(matcherStack);
matcherStack.clear();
return (List) matchers;
}
代码示例来源:origin: oracle/opengrok
@Override
protected void clearStack() {
super.clearStack();
popStrings.clear();
docLabels.clear();
}
代码示例来源:origin: JetBrains/ideavim
/**
* Resets the command, mode, visual mode, and mapping mode to initial values.
*/
public void reset() {
myCommand = null;
myStates.clear();
updateStatus();
}
代码示例来源:origin: JetBrains/ideavim
/**
* Resets the state of this handler. Does a partial reset then resets the mode, the command, and the argument
*
* @param editor The editor to reset.
*/
public void reset(@Nullable Editor editor) {
partialReset(editor);
state = State.NEW_COMMAND;
currentCmd.clear();
currentArg = Argument.Type.NONE;
digraph = null;
}
代码示例来源:origin: oracle/opengrok
@Override
protected void clearStack() {
super.clearStack();
styleStack.clear();
}
代码示例来源:origin: oracle/opengrok
@Override
protected void clearStack() {
super.clearStack();
styleStack.clear();
}
代码示例来源:origin: oracle/opengrok
@Override
protected void clearStack() {
super.clearStack();
docLabels.clear();
}
代码示例来源:origin: pmd/pmd
@Override
public Object visit(ASTCompilationUnit node, Object data) {
currentLookup.clear();
return super.visit(node, data);
}
代码示例来源:origin: google/j2objc
private void assertIncorrectUseOfAdditionalMatchers(String additionalMatcherName, int count) {
if(matcherStack.size() < count) {
ArrayList<LocalizedMatcher> lastMatchers = new ArrayList<LocalizedMatcher>(matcherStack);
matcherStack.clear();
new Reporter().incorrectUseOfAdditionalMatchers(additionalMatcherName, count, lastMatchers);
}
}
代码示例来源:origin: google/j2objc
public void validateState() {
if (!matcherStack.isEmpty()) {
ArrayList lastMatchers = new ArrayList<LocalizedMatcher>(matcherStack);
matcherStack.clear();
new Reporter().misplacedArgumentMatcher(lastMatchers);
}
}
代码示例来源:origin: google/j2objc
private void assertMatchersFoundFor(String additionalMatcherName) {
if (matcherStack.isEmpty()) {
matcherStack.clear();
new Reporter().reportNoSubMatchersFound(additionalMatcherName);
}
}
代码示例来源:origin: oracle/opengrok
/**
* Resets the Ruby tracked state; {@inheritDoc}
*/
@Override
public void reset() {
super.reset();
if (helpers != null) helpers.clear();
h.reset();
lastSymbol = null;
}
代码示例来源:origin: oracle/opengrok
/**
* Resets the Ruby tracked state; {@inheritDoc}
*/
@Override
public void reset() {
super.reset();
if (helpers != null) helpers.clear();
h.reset();
}
代码示例来源:origin: libgdx/libgdx
/** Handles a runtime/loading error in {@link #update()} by optionally invoking the {@link AssetErrorListener}.
* @param t */
private void handleTaskError (Throwable t) {
log.error("Error loading asset.", t);
if (tasks.isEmpty()) throw new GdxRuntimeException(t);
// pop the faulty task from the stack
AssetLoadingTask task = tasks.pop();
AssetDescriptor assetDesc = task.assetDesc;
// remove all dependencies
if (task.dependenciesLoaded && task.dependencies != null) {
for (AssetDescriptor desc : task.dependencies) {
unload(desc.fileName);
}
}
// clear the rest of the stack
tasks.clear();
// inform the listener that something bad happened
if (listener != null) {
listener.error(assetDesc, t);
} else {
throw new GdxRuntimeException(t);
}
}
代码示例来源:origin: libgdx/libgdx
/** Handles a runtime/loading error in {@link #update()} by optionally invoking the {@link AssetErrorListener}.
* @param t */
private void handleTaskError (Throwable t) {
log.error("Error loading asset.", t);
if (tasks.isEmpty()) throw new GdxRuntimeException(t);
// pop the faulty task from the stack
AssetLoadingTask task = tasks.pop();
AssetDescriptor assetDesc = task.assetDesc;
// remove all dependencies
if (task.dependenciesLoaded && task.dependencies != null) {
for (AssetDescriptor desc : task.dependencies) {
unload(desc.fileName);
}
}
// clear the rest of the stack
tasks.clear();
// inform the listener that something bad happened
if (listener != null) {
listener.error(assetDesc, t);
} else {
throw new GdxRuntimeException(t);
}
}
内容来源于网络,如有侵权,请联系作者删除!