本文整理了Java中java.util.Deque.toArray()
方法的一些代码示例,展示了Deque.toArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deque.toArray()
方法的具体详情如下:
包路径:java.util.Deque
类名称:Deque
方法名:toArray
暂无
代码示例来源:origin: btraceio/btrace
@Override
public synchronized <T> T[] toArray(T[] a) {
return delegate.toArray(a);
}
代码示例来源:origin: btraceio/btrace
@Override
public synchronized Object[] toArray() {
return delegate.toArray();
}
代码示例来源:origin: robovm/robovm
@Override public Object[] toArray() {
return q.toArray();
}
代码示例来源:origin: robovm/robovm
@Override public <T> T[] toArray(T[] contents) {
return q.toArray(contents);
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@NotNull @Override public Object[] toArray() {
return deque.toArray();
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@NotNull @Override public <T> T[] toArray(@NotNull T[] ts) {
return deque.toArray(ts);
}
代码示例来源:origin: google/guava
@Override
public <T> T[] toArray(T[] array) {
assertTrue(Thread.holdsLock(mutex));
return delegate.toArray(array);
}
代码示例来源:origin: google/guava
@Override
public Object[] toArray() {
assertTrue(Thread.holdsLock(mutex));
return delegate.toArray();
}
代码示例来源:origin: spring-projects/spring-framework
/**
* Eat an identifier, possibly qualified (meaning that it is dotted).
* TODO AndyC Could create complete identifiers (a.b.c) here rather than a sequence of them? (a, b, c)
*/
private SpelNodeImpl eatPossiblyQualifiedId() {
Deque<SpelNodeImpl> qualifiedIdPieces = new ArrayDeque<>();
Token node = peekToken();
while (isValidQualifiedId(node)) {
nextToken();
if (node.kind != TokenKind.DOT) {
qualifiedIdPieces.add(new Identifier(node.stringValue(), node.startPos, node.endPos));
}
node = peekToken();
}
if (qualifiedIdPieces.isEmpty()) {
if (node == null) {
throw internalException( this.expressionString.length(), SpelMessage.OOD);
}
throw internalException(node.startPos, SpelMessage.NOT_EXPECTED_TOKEN,
"qualified ID", node.getKind().toString().toLowerCase());
}
return new QualifiedIdentifier(qualifiedIdPieces.getFirst().getStartPosition(),
qualifiedIdPieces.getLast().getEndPosition(), qualifiedIdPieces.toArray(new SpelNodeImpl[0]));
}
代码示例来源:origin: jooby-project/jooby
helpers.forEach(h -> helpersBinding.addBinding().to(h));
HbsEngine engine = new HbsEngine(hbs, resolvers.toArray(new ValueResolver[resolvers.size()]));
代码示例来源:origin: glyptodon/guacamole-client
elements.toArray(new String[elements.size()])
);
代码示例来源:origin: org.springframework/spring-expression
/**
* Eat an identifier, possibly qualified (meaning that it is dotted).
* TODO AndyC Could create complete identifiers (a.b.c) here rather than a sequence of them? (a, b, c)
*/
private SpelNodeImpl eatPossiblyQualifiedId() {
Deque<SpelNodeImpl> qualifiedIdPieces = new ArrayDeque<>();
Token node = peekToken();
while (isValidQualifiedId(node)) {
nextToken();
if (node.kind != TokenKind.DOT) {
qualifiedIdPieces.add(new Identifier(node.stringValue(), toPos(node)));
}
node = peekToken();
}
if (qualifiedIdPieces.isEmpty()) {
if (node == null) {
throw internalException( this.expressionString.length(), SpelMessage.OOD);
}
throw internalException(node.startPos, SpelMessage.NOT_EXPECTED_TOKEN,
"qualified ID", node.getKind().toString().toLowerCase());
}
int pos = toPos(qualifiedIdPieces.getFirst().getStartPosition(), qualifiedIdPieces.getLast().getEndPosition());
return new QualifiedIdentifier(pos, qualifiedIdPieces.toArray(new SpelNodeImpl[0]));
}
代码示例来源:origin: google/guava
create().retainAll(ImmutableList.of("foo"));
create().size();
create().toArray();
create().toArray(new String[] {"foo"});
create().addFirst("e");
create().addLast("e");
代码示例来源:origin: 58code/Argo
public Object[] toArray() { return q.toArray(); }
public <T> T[] toArray(T[] a) { return q.toArray(a); }
代码示例来源:origin: 58code/Argo
public <T> T[] toArray(T[] a) { return q.toArray(a); }
public String toString() { return q.toString(); }
代码示例来源:origin: magefree/mage
/**
* Tests only -- find card position in library
*/
public int getCardPosition(UUID cardId) {
UUID[] list = library.toArray(new UUID[0]);
for (int i = 0; i < list.length; i++) {
if (list[i].equals(cardId)) {
return i;
}
}
return -1;
}
}
代码示例来源:origin: magefree/mage
/**
* Don't use this directly. Use <player.shuffleLibrary(game)> instead.
*/
public void shuffle() {
UUID[] shuffled = library.toArray(new UUID[0]);
for (int n = shuffled.length - 1; n > 0; n--) {
int r = RandomUtil.nextInt(n + 1);
UUID temp = shuffled[n];
shuffled[n] = shuffled[r];
shuffled[r] = temp;
}
library.clear();
library.addAll(Arrays.asList(shuffled));
}
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
currentLanguageId,
new AggregateResourceBundle(
currentResourceBundles.toArray(
new ResourceBundle[size])));
代码示例来源:origin: vert-x3/vertx-web
private synchronized void writePendingMessages() {
if (listener != null) {
String json = JsonCodec.encode(pendingWrites.toArray());
listener.sendFrame("a" + json);
pendingWrites.clear();
messagesSize = 0;
if (drainHandler != null) {
Handler<Void> dh = drainHandler;
drainHandler = null;
context.runOnContext(dh);
}
}
}
代码示例来源:origin: espertechinc/esper
public QueryGraphValuePairRangeIndexForge getRangeProps() {
Deque<String> indexed = new ArrayDeque<String>();
List<QueryGraphValueEntryRangeForge> keys = new ArrayList<QueryGraphValueEntryRangeForge>();
for (QueryGraphValueDescForge desc : items) {
if (desc.getEntry() instanceof QueryGraphValueEntryRangeForge) {
QueryGraphValueEntryRangeForge keyprop = (QueryGraphValueEntryRangeForge) desc.getEntry();
keys.add(keyprop);
indexed.add(getSingleIdentNodeProp(desc.getIndexExprs()));
}
}
return new QueryGraphValuePairRangeIndexForge(indexed.toArray(new String[indexed.size()]), keys);
}
内容来源于网络,如有侵权,请联系作者删除!