Skip to content

Commit

Permalink
GEOT-3131 remove unnecessary cycle and sysout
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasma5 committed May 8, 2013
1 parent 78bbdd1 commit 4ab2c45
Showing 1 changed file with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,16 @@ public int update(int i) {
return(i);
}


public void update(Object value) {
Integer index = ((Integer)m_obj2index.get(value));
if (index == null) {
for (int i = 1; i < m_count; i++) {
Object o = (Object)m_values[i];
if (o == value)
System.out.println();
}
}
update(index.intValue());
//TODO: improve performance, dont use a linear search
// for (int i = 1; i < m_values.length; i++) {
// if (m_values[i] == value) {
// update(i);
// return;
// }
// }
/**
* This method find index based on object value in parameter and call update
* method on that index
*
* @param value - object which will be updated
*/
public void update(Object value) {
Integer index = ((Integer) m_obj2index.get(value));
if (index != null)
update(index.intValue());
}

public boolean isEmpty() { return(m_count == 0); }
Expand Down

0 comments on commit 4ab2c45

Please sign in to comment.