java.util.Vector.subList()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中java.util.Vector.subList()方法的一些代码示例,展示了Vector.subList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.subList()方法的具体详情如下:
包路径:java.util.Vector
类名称:Vector
方法名:subList

Vector.subList介绍

[英]Returns a List of the specified portion of this vector from the start index to one less than the end index. The returned List is backed by this vector so changes to one are reflected by the other.
[中]返回此向量指定部分的列表,从开始索引到比结束索引小的一个。返回的列表由该向量支持,因此对其中一个的更改将由另一个反映出来。

代码示例

代码示例来源:origin: com.bbossgroups.rpc/bboss-rpc

public synchronized java.util.List subList(int fromIndex, int toIndex) {
  return v.subList(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.ui

public List subList(int startIndex, int endIndex) {
  return objectVector.subList(startIndex, endIndex);
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

public synchronized java.util.List subList(int fromIndex, int toIndex) {
  return v.subList(fromIndex, toIndex);
}

代码示例来源:origin: stackoverflow.com

public static <E> Vector<E> shifted(Vector<E> input, int amount) {
  if (input.isEmpty())
    return new Vector<>();
  int shift = (amount % input.size() + input.size()) % input.size();
  if (shift == 0)
    return new Vector<>(input);
  Vector<E> v = new Vector<>(input.size());
  v.addAll(input.subList(input.size() - shift, input.size()));
  v.addAll(input.subList(0, input.size() - shift));
  return v;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * @see java.util.Vector#subList(int, int)
 */
@Override
public List<E> subList(int fromIndex, int toIndex) {
  return getDelegate().subList(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * @see java.util.Vector#subList(int, int)
 */
public List subList(int fromIndex, int toIndex) {
  return getDelegate().subList(fromIndex, toIndex);
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * @see java.util.Vector#subList(int, int)
 */
@Override
public List<E> subList(int fromIndex, int toIndex) {
  return getDelegate().subList(fromIndex, toIndex);
}

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * @see java.util.Vector#subList(int, int)
 */
public List subList(int fromIndex, int toIndex) {
  return this.getDelegate().subList(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

private void trimHistory(Object location) {
  List<HistoryObject> newHistory = history.subList(0, navigationLocation + 1);
  history = new Vector<>(newHistory);
  history.add(new HistoryObject(location));
  // point the nav location to the end of the vector.
  navigationLocation = getHistoryEndPosition();
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * If index is missing wait until reached or complete.
 */
public List subList(int fromIndex, int toIndex) {
  while ((!isComplete()) && (super.size() < toIndex)) {
    waitUntilAdd();
  }
  return super.subList(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * If index is missing wait until reached or complete.
 */
public List subList(int fromIndex, int toIndex) {
  while ((!isComplete()) && (super.size() < toIndex)) {
    waitUntilAdd();
  }
  return super.subList(fromIndex, toIndex);
}

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * If index is missing wait until reached or complete.
 */
public List subList(int fromIndex, int toIndex) {
  while ((!isComplete()) && (super.size() < toIndex)) {
    waitUntilAdd();
  }
  return super.subList(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * If index is missing wait until reached or complete.
 */
public List subList(int fromIndex, int toIndex) {
  while ((!isComplete()) && (super.size() < toIndex)) {
    waitUntilAdd();
  }
  return super.subList(fromIndex, toIndex);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

@Override
public synchronized List subList(int start, int end) {
  if (!_directAccess && isDelayLoad()) {
    load();
  }
  return super.subList(start, end);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

@Override
public synchronized List subList(int start, int end) {
  if (!_directAccess && isDelayLoad()) {
    load();
  }
  return super.subList(start, end);
}

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

/**
 * Returns a new SegmentInfos containg the SegmentInfo
 * instances in the specified range first (inclusive) to
 * last (exclusive), so total number of segments returned
 * is last-first.
 */
public SegmentInfos range(int first, int last) {
 SegmentInfos infos = new SegmentInfos();
 infos.addAll(super.subList(first, last));
 return infos;
}

代码示例来源:origin: org.apache.lucene/lucene-core-jfrog

/**
 * Returns a new SegmentInfos containg the SegmentInfo
 * instances in the specified range first (inclusive) to
 * last (exclusive), so total number of segments returned
 * is last-first.
 */
public SegmentInfos range(int first, int last) {
 SegmentInfos infos = new SegmentInfos();
 infos.addAll(super.subList(first, last));
 return infos;
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

@Override
public synchronized List subList(int start, int end) {
  if (!_directAccess && isDelayLoad()) {
    load();
  }
  return super.subList(start, end);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

@Override
public synchronized List subList(int start, int end) {
  if (!_directAccess && isDelayLoad()) {
    load();
  }
  return super.subList(start, end);
}

代码示例来源:origin: octo-online/reactive-audit

@Test(expected = ReactiveAuditException.class)
public void subList()
{
  ReactiveAudit.off.commit();
  Vector vector=new Vector();
  TestTools.strict.commit();
  vector.subList(0, 0);
}
@Test(expected = ReactiveAuditException.class)

相关文章

微信公众号

最新文章

更多