Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascraigschmidt committed Apr 28, 2019
1 parent 622b219 commit 247f013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ImageCounter/src/main/java/edu/vandy/utils/SimpleSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public boolean add(E element){

// Check that there's sufficient capacity in the array,
// expanding if it needed.
checkCapacityAndExpandIfNecessary(mSize + 1);
ensureCapacityInternal(mSize + 1);

// Add the element at the rear of the array.
mElementData[mEnd] = element;
Expand All @@ -92,7 +92,7 @@ public boolean add(E element){
* Ensure the array is large enough to hold @a minCapacity
* elements. The array will be expanded if necessary.
*/
private void checkCapacityAndExpandIfNecessary(int minCapacity) {
private void ensureCapacityInternal(int minCapacity) {
if (minCapacity - mElementData.length > 0) {
int oldCapacity = mElementData.length;
int newCapacity = oldCapacity + (oldCapacity >> 1);
Expand Down

0 comments on commit 247f013

Please sign in to comment.