java.util.ArrayList.removeRange()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(205)

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

ArrayList.removeRange介绍

[英]Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)
[中]从此列表中删除其索引介于fromIndex(包含)和toIndex(独占)之间的所有元素。将任何后续元素向左移动(减少其索引)。此调用通过(toIndex-fromIndex)元素缩短列表。(如果toIndex==fromIndex,则此操作无效。)

代码示例

代码示例来源:origin: apache/hive

@Override
 public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
 }
};

代码示例来源:origin: apache/hive

@Override
 public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
 }
}

代码示例来源:origin: wildfly/wildfly

@Override
  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: wildfly/wildfly

public void removeRange(final int fromIndex, final int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: apache/drill

@Override
 public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
 }
};

代码示例来源:origin: org.codehaus.groovy/groovy

protected void removeRange(int fromIndex, int toIndex) {
  hashCode = 0;
  super.removeRange(fromIndex, toIndex);
}

代码示例来源:origin: airbnb/epoxy

@Override
protected void removeRange(int fromIndex, int toIndex) {
 if (fromIndex == toIndex) {
  return;
 }
 notifyRemoval(fromIndex, toIndex - fromIndex);
 super.removeRange(fromIndex, toIndex);
}

代码示例来源:origin: org.jsoup/jsoup

@Override
protected void removeRange(int fromIndex, int toIndex) {
  onContentsChanged();
  super.removeRange(fromIndex, toIndex);
}

代码示例来源:origin: plutext/docx4j

/**
   * @see java.util.ArrayList#removeRange(int, int)
   */
  @Override
  protected void removeRange(int fromIndex, int toIndex)
  {
    for (int index = fromIndex; index < toIndex; index++)
    {
      this.get(index).setParent(null);
    }
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: google/re2j

@Override
 public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
 }
}

代码示例来源:origin: Meituan-Dianping/Shield

@Override

  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: apache/activemq-artemis

@Override
  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: org.apache.hive/hive-service

@Override
 public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
 }
}

代码示例来源:origin: apache/activemq-artemis

@Override
  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: chocoteam/choco-solver

@Override
  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

@Override
protected void removeRange(int fromIndex, int toIndex) {
  boolean xch = trackFirstChange();
  changed |= (toIndex > fromIndex);
  if (xch && changed) {
    origMap = getOrigMap();
  }
  super.removeRange(fromIndex, toIndex);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
  public void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}

代码示例来源:origin: YahooArchive/samoa

@Override
protected void removeRange(int arg0, int arg1) {
  super.removeRange(arg0, arg1);
  trimToSize();
}

代码示例来源:origin: com.jgoodies/jgoodies-common

@Override
protected final void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
  fireIntervalRemoved(fromIndex, toIndex - 1);
}

代码示例来源:origin: tianzhijiexian/CommonAdapter

@Override
public void removeRange(int fromIndex, int toIndex) {
  super.removeRange(fromIndex, toIndex);
  notifyRemove(fromIndex, toIndex - fromIndex);
}

相关文章