@Override public synchronized <T> T[] toArray(T[] a) { return delegate.toArray(a); }
@Override public synchronized Object[] toArray() { return delegate.toArray(); }
@Override public Object[] toArray() { return q.toArray(); }
@Override public <T> T[] toArray(T[] contents) { return q.toArray(contents); }
/** {@inheritDoc} */ @NotNull @Override public Object[] toArray() { return deque.toArray(); }
/** {@inheritDoc} */ @NotNull @Override public <T> T[] toArray(@NotNull T[] ts) { return deque.toArray(ts); }
@Override public <T> T[] toArray(T[] array) { assertTrue(Thread.holdsLock(mutex)); return delegate.toArray(array); }
@Override public Object[] toArray() { assertTrue(Thread.holdsLock(mutex)); return delegate.toArray(); }
/** * 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])); }
helpers.forEach(h -> helpersBinding.addBinding().to(h)); HbsEngine engine = new HbsEngine(hbs, resolvers.toArray(new ValueResolver[resolvers.size()]));
elements.toArray(new String[elements.size()]) );
/** * 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])); }
public Object[] toArray() { return q.toArray(); } public <T> T[] toArray(T[] a) { return q.toArray(a); }
public <T> T[] toArray(T[] a) { return q.toArray(a); } public String toString() { return q.toString(); }
/** * 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; } }
/** * 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)); }
currentLanguageId, new AggregateResourceBundle( currentResourceBundles.toArray( new ResourceBundle[size])));
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); } } }
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); }