本文整理了Java中java.util.Deque.clear()
方法的一些代码示例,展示了Deque.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deque.clear()
方法的具体详情如下:
包路径:java.util.Deque
类名称:Deque
方法名:clear
暂无
代码示例来源:origin: ReactiveX/RxJava
void clear(Deque<T> dq) {
synchronized (dq) {
dq.clear();
}
}
代码示例来源:origin: redisson/redisson
void clear(Deque<T> dq) {
synchronized (dq) {
dq.clear();
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* Reset the statement parameter queue, the rows affected cache,
* and the execution count.
*/
public void reset() {
this.parameterQueue.clear();
this.rowsAffected.clear();
}
代码示例来源:origin: neo4j/neo4j
public synchronized void clear()
{
chunks.clear();
chunkCursor = 0;
}
}
代码示例来源:origin: square/leakcanary
private void clearState() {
toVisitQueue.clear();
toVisitIfNoPathQueue.clear();
toVisitSet.clear();
toVisitIfNoPathSet.clear();
visitedSet.clear();
}
代码示例来源:origin: checkstyle/checkstyle
@Override
public void beginTree(DetailAST rootAST) {
// clear data
parameterNamesStack.clear();
parameterNames = Collections.emptySet();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public void setNestedPath(@Nullable String nestedPath) {
doSetNestedPath(nestedPath);
this.nestedPathStack.clear();
}
代码示例来源:origin: apache/kafka
/**
*
* Clear the stored history of sent records, consumer group offsets, and transactional state
*/
public synchronized void clear() {
this.sent.clear();
this.uncommittedSends.clear();
this.completions.clear();
this.consumerGroupOffsets.clear();
this.uncommittedConsumerGroupOffsets.clear();
this.transactionInitialized = false;
this.transactionInFlight = false;
this.transactionCommitted = false;
this.transactionAborted = false;
this.producerFenced = false;
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void reset() {
preOps.clear();
postOps.clear();
setOps.clear();
simpleMatrix = SimpleMatrix.newIdentityMatrix();
}
代码示例来源:origin: apache/flink
@Override
public void close() throws Exception {
super.close();
sessionIds.clear();
sessionIdsPerSnapshot.clear();
}
代码示例来源:origin: org.springframework/spring-context
@Override
public void setNestedPath(@Nullable String nestedPath) {
doSetNestedPath(nestedPath);
this.nestedPathStack.clear();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public void reset() {
getUsedHistoryQueue().clear();
if (logger.isDebugEnabled()) {
logger.debug("reset data source used history");
}
}
}
代码示例来源:origin: robolectric/robolectric
/** Resets internal lists of active trace sections. */
@Resetter
public static void reset() {
synchronized (lock) {
currentSections.clear();
previousSections.clear();
}
crashOnIncorrectUsage = CRASH_ON_INCORRECT_USAGE_DEFAULT;
}
}
代码示例来源:origin: checkstyle/checkstyle
@Override
public void beginTree(DetailAST rootAST) {
context = new Context(false);
contextStack.clear();
}
代码示例来源:origin: google/guava
@Override
public void clear() {
assertTrue(Thread.holdsLock(mutex));
delegate.clear();
}
代码示例来源:origin: eclipse-vertx/vert.x
private void handleException(Exception e) {
handshaking = false;
buffered.clear();
Handler<Throwable> handler = exceptionHandler();
if (handler != null) {
context.executeFromIO(v -> {
handler.handle(e);
});
} else {
log.error("Error in websocket handshake", e);
}
}
代码示例来源:origin: checkstyle/checkstyle
@Override
public void beginTree(DetailAST ast) {
handlerFactory.clearCreatedHandlers();
handlers.clear();
final PrimordialHandler primordialHandler = new PrimordialHandler(this);
handlers.push(primordialHandler);
primordialHandler.checkIndentation();
incorrectIndentationLines = new HashSet<>();
}
代码示例来源:origin: ben-manes/caffeine
@Test(dataProvider = "empty")
public void clear_whenEmpty(Deque<?> deque) {
deque.clear();
assertThat(deque, is(deeplyEmpty()));
}
代码示例来源:origin: ben-manes/caffeine
@Test(dataProvider = "full")
public void clear_whenPopulated(Deque<?> deque) {
deque.clear();
assertThat(deque, is(deeplyEmpty()));
}
代码示例来源:origin: spring-projects/spring-framework
@Override
protected SpelExpression doParseExpression(String expressionString, @Nullable ParserContext context)
throws ParseException {
try {
this.expressionString = expressionString;
Tokenizer tokenizer = new Tokenizer(expressionString);
this.tokenStream = tokenizer.process();
this.tokenStreamLength = this.tokenStream.size();
this.tokenStreamPointer = 0;
this.constructedNodes.clear();
SpelNodeImpl ast = eatExpression();
Assert.state(ast != null, "No node");
Token t = peekToken();
if (t != null) {
throw new SpelParseException(t.startPos, SpelMessage.MORE_INPUT, toString(nextToken()));
}
Assert.isTrue(this.constructedNodes.isEmpty(), "At least one node expected");
return new SpelExpression(expressionString, ast, this.configuration);
}
catch (InternalParseException ex) {
throw ex.getCause();
}
}
内容来源于网络,如有侵权,请联系作者删除!