From 432ddb313fb473d06e869697c9839c0d93fcfab4 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 1 Sep 2015 11:30:12 +0200 Subject: [PATCH] =?utf8?q?Changed=20to=20SortedSet=20to=20keep=20ordering?= =?utf8?q?=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/org/mxchange/jcore/database/result/DatabaseResult.java | 5 ++--- src/org/mxchange/jcore/database/result/Result.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/org/mxchange/jcore/database/result/DatabaseResult.java b/src/org/mxchange/jcore/database/result/DatabaseResult.java index 352d041..ca36f22 100644 --- a/src/org/mxchange/jcore/database/result/DatabaseResult.java +++ b/src/org/mxchange/jcore/database/result/DatabaseResult.java @@ -22,7 +22,6 @@ import java.sql.SQLWarning; import java.text.MessageFormat; import java.util.Collections; import java.util.Iterator; -import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.mxchange.jcore.BaseFrameworkSystem; @@ -142,8 +141,8 @@ public class DatabaseResult extends BaseFrameworkSystem implements Result resultSet () { + public SortedSet resultSet () { // Return it unmodifiable - return Collections.unmodifiableSet(this.result); + return Collections.unmodifiableSortedSet(this.result); } } diff --git a/src/org/mxchange/jcore/database/result/Result.java b/src/org/mxchange/jcore/database/result/Result.java index 4a733e1..8337c5e 100644 --- a/src/org/mxchange/jcore/database/result/Result.java +++ b/src/org/mxchange/jcore/database/result/Result.java @@ -18,7 +18,7 @@ package org.mxchange.jcore.database.result; import java.sql.SQLWarning; import java.util.Iterator; -import java.util.Set; +import java.util.SortedSet; import org.mxchange.jcore.FrameworkInterface; import org.mxchange.jcore.database.storage.Storable; @@ -63,5 +63,5 @@ public interface Result extends FrameworkInterface, Iterator * * @return A map from this result */ - public Set resultSet (); + public SortedSet resultSet (); } -- 2.39.5