public boolean findDuplicate(E o) { int hash = hash(o); return findDuplicate(o, hash); }
/** * Pushes a new object to the stack. * * @return * true if this object has already been pushed */ public boolean push(E o) { if(data.length==size) expandCapacity(); data[size] = o; int hash = hash(o); boolean r = findDuplicate(o, hash); next[size] = initialHash[hash]; initialHash[hash] = size+1; size++; this.latestPushResult = r; return latestPushResult; }
public boolean findDuplicate(E o) { int hash = hash(o); return findDuplicate(o, hash); }
/** * Pushes a new object to the stack. * * @return * true if this object has already been pushed */ public boolean push(E o) { if(data.length==size) expandCapacity(); data[size] = o; int hash = hash(o); boolean r = findDuplicate(o, hash); next[size] = initialHash[hash]; initialHash[hash] = size+1; size++; this.latestPushResult = r; return latestPushResult; }
public boolean findDuplicate(E o) { int hash = hash(o); return findDuplicate(o, hash); }
public boolean findDuplicate(E o) { int hash = hash(o); return findDuplicate(o, hash); }
/** * Pushes a new object to the stack. * * @return * true if this object has already been pushed */ public boolean push(E o) { if(data.length==size) expandCapacity(); data[size] = o; int hash = hash(o); boolean r = findDuplicate(o, hash); next[size] = initialHash[hash]; initialHash[hash] = size+1; size++; this.latestPushResult = r; return latestPushResult; }
/** * Pushes a new object to the stack. * * @return * true if this object has already been pushed */ public boolean push(E o) { if(data.length==size) expandCapacity(); data[size] = o; int hash = hash(o); boolean r = findDuplicate(o, hash); next[size] = initialHash[hash]; initialHash[hash] = size+1; size++; this.latestPushResult = r; return latestPushResult; }