gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67bed8b)
raw | patch | inline | side by side (parent: 67bed8b)
author | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 27 Mar 2018 19:24:33 +0000 (21:24 +0200) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 27 Mar 2018 19:24:33 +0000 (21:24 +0200) |
greskom je korisen prekopiran compareTo za poredjenje elemenata
umesto equals. alternativno je moglo pisati compareTo != 0.
umesto equals. alternativno je moglo pisati compareTo != 0.
kodovi/liste/ListeRazlicitihElemenata.java | patch | blob | history |
diff --git a/kodovi/liste/ListeRazlicitihElemenata.java b/kodovi/liste/ListeRazlicitihElemenata.java
index 05bdd0bfc66eeb3d2f55d802abc23bb81c6d0cdb..71d88b48c54e79f63ba80da904139a8747ffb951 100644 (file)
/** Vraca da li String {@code s} postoji u listi. */
public boolean uListi(String s) {
Element tekuci = prvi;
- while (tekuci != null && tekuci.info.compareTo(s) < 0) {
+ while (tekuci != null && !tekuci.info.equals(s)) {
tekuci = tekuci.veza;
}