Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

slightly more efficient constructor

  • Loading branch information...
commit d25cfcea6e1c3d383b150be20038ea8884980b39 1 parent 6a905e0
Nigel Small authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 geoff-core/src/main/java/org/neo4j/geoff/util/SparseArray.java
View
6 geoff-core/src/main/java/org/neo4j/geoff/util/SparseArray.java
@@ -36,9 +36,9 @@ public SparseArray(T item) {
public SparseArray(Set<T> items) {
this();
- ArrayList<T> itemList = new ArrayList<T>(items);
- for (int i = 0; i < itemList.size(); i++) {
- this.items.put(i + 1, itemList.get(i));
+ int i = 1;
+ for (T item : items) {
+ this.items.put(i++, item);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.