本文整理了Java中java.util.Vector.listIterator()
方法的一些代码示例,展示了Vector.listIterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.listIterator()
方法的具体详情如下:
包路径:java.util.Vector
类名称:Vector
方法名:listIterator
[英]Returns a list iterator over the elements in this list (in proper sequence).
The returned list iterator is fail-fast.
[中]返回此列表中元素的列表迭代器(按正确顺序)。
返回的列表迭代器是fail-fast。
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private String reconstructMostly( Vector stmt ) {
StringBuffer buf = new StringBuffer(100);
for ( ListIterator i = stmt.listIterator(); i.hasNext(); ) {
buf.append( StatSpecTokens.SPACE );
buf.append( (String) i.next() );
}
return buf.toString();
}
private String getText( String fn ) throws FileNotFoundException {
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private String reconstructMostly( Vector stmt ) {
StringBuffer buf = new StringBuffer(100);
for ( ListIterator i = stmt.listIterator(); i.hasNext(); ) {
buf.append( TrimSpecTokens.SPACE );
buf.append( (String) i.next() );
}
return buf.toString();
}
private String getText( String fn ) throws FileNotFoundException {
代码示例来源:origin: stackoverflow.com
Stack<Integer> stack = new Stack<Integer>();
stack.push(1);
stack.push(2);
stack.push(3);
for (ListIterator<Integer> iterator = stack.listIterator(stack.size()); iterator.hasPrevious();) {
Integer integer = iterator.previous();
System.out.println(integer);
}
// Output: 3 2 1
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
/** returns the subset of the list iterator that is the attribute value */
private ListIterator getNextAttributeValueIterator( ListIterator i ) {
Vector valuetokens = getNextAttributeValue( i );
//log().finest( "getNextAttributeValueIterator returning " + valuetokens );
return valuetokens.size() == 0 ? null : valuetokens.listIterator();
}
private Vector getNextAttributeValue( ListIterator i ) {
代码示例来源:origin: sc.fiji/Cell_Counter
public void reset() {
if (typeVector.size() < 1) {
return;
}
final ListIterator<CellCntrMarkerVector> mit = typeVector.listIterator();
while (mit.hasNext()) {
final CellCntrMarkerVector mv = mit.next();
mv.clear();
}
if (ic != null) ic.repaint();
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
@Override
public ListIterator listIterator(int paramInt) {
if (_directAccess) {
return super.listIterator(paramInt);
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator(paramInt);
return ProxyCollections.afterListIterator(this, paramInt,
localListIterator);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
@Override
public ListIterator listIterator() {
if (_directAccess) {
return super.listIterator();
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator();
return ProxyCollections.afterListIterator(this, localListIterator);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
@Override
public ListIterator listIterator(int paramInt) {
if (_directAccess) {
return super.listIterator(paramInt);
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator(paramInt);
return ProxyCollections.afterListIterator(this, paramInt,
localListIterator);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
@Override
public ListIterator listIterator() {
if (_directAccess) {
return super.listIterator();
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator();
return ProxyCollections.afterListIterator(this, localListIterator);
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
@Override
public ListIterator listIterator(int paramInt) {
if (_directAccess) {
return super.listIterator(paramInt);
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator(paramInt);
return ProxyCollections.afterListIterator(this, paramInt,
localListIterator);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
@Override
public ListIterator listIterator() {
if (_directAccess) {
return super.listIterator();
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator();
return ProxyCollections.afterListIterator(this, localListIterator);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
@Override
public ListIterator listIterator(int paramInt) {
if (_directAccess) {
return super.listIterator(paramInt);
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator(paramInt);
return ProxyCollections.afterListIterator(this, paramInt,
localListIterator);
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
@Override
public ListIterator listIterator() {
if (_directAccess) {
return super.listIterator();
}
if (isDelayLoad()) {
load();
}
ListIterator localListIterator = super.listIterator();
return ProxyCollections.afterListIterator(this, localListIterator);
}
代码示例来源:origin: stackoverflow.com
TIFFEncodeParam params = new TIFFEncodeParam();
OutputStream out = new FileOutputStream(output_dir + image_name + ".tif");
ImageEncoder encoder = ImageCodec.createImageEncoder("tiff", out, params);
Vector vector = new Vector();
for (int i = 0; i < numImages; i++) {
vector.add(image[i]);
}
params.setExtraImages(vector.listIterator(1)); // this may need a check to avoid IndexOutOfBoundsException when vector is empty
encoder.encode(image[0]);
out.close();
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private TrimSpec parseTrimSpec( Vector stmt ) {
ListIterator i = stmt.listIterator();
i.next(); // move past trimspec keyword
String name = parseJavaIdentifier( i );
TrimSpec trimspec = new TrimSpec( name );
parseTrimSpecParams( i, trimspec );
return trimspec;
}
private void parseTrimSpecParams( ListIterator i, TrimSpec trimspec ) {
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private HydraThreadGroup parseThreadGroup( Vector stmt ) {
ListIterator i = stmt.listIterator();
i.next(); // move past threadgroup keyword
String name = parseJavaIdentifier( i );
HydraThreadGroup tg = new HydraThreadGroup( name );
parseThreadSubgroups( i, tg );
return tg;
}
private void parseThreadSubgroups( ListIterator i, HydraThreadGroup tg ) {
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private RuntimeStatSpec parseRuntimeStatSpec( Vector stmt ) {
ListIterator i = stmt.listIterator();
RuntimeStatSpec statspec = new RuntimeStatSpec();
parseStatSpecId( i, statspec );
parseStatSpecParams( i, statspec );
return statspec;
}
private StatSpec parseStatSpec( Vector stmt ) {
代码示例来源:origin: io.snappydata/gemfire-hydra-tests
private StatSpec parseStatSpec( Vector stmt ) {
ListIterator i = stmt.listIterator();
i.next(); // move past spec keyword
String name = parseJavaIdentifier( i );
StatSpec statspec = new StatSpec( name );
parseStatSpecId( i, statspec );
parseStatSpecParams( i, statspec );
return statspec;
}
/** Form is expr = numerator / denominator ops = min, max; */
代码示例来源:origin: octo-online/reactive-audit
@Test(expected = ReactiveAuditException.class)
public void listIterator_1()
{
ReactiveAudit.off.commit();
Vector vector=new Vector();
TestTools.strict.commit();
vector.listIterator();
}
@Test(expected = ReactiveAuditException.class)
代码示例来源:origin: octo-online/reactive-audit
@Test(expected = ReactiveAuditException.class)
public void listIterator_2()
{
ReactiveAudit.off.commit();
Vector vector=new Vector();
TestTools.strict.commit();
vector.listIterator(0);
}
@Test(expected = ReactiveAuditException.class)
内容来源于网络,如有侵权,请联系作者删除!