much implementation, ready for first test
This commit is contained in:
@@ -19,12 +19,14 @@ import java.time.Duration;
|
||||
*/
|
||||
public class SortResult {
|
||||
|
||||
private int[] sortedArray;
|
||||
private String sortType;
|
||||
private Integer [] sortedArray;
|
||||
private String comparisonsUsed;
|
||||
private String swapsUsed;
|
||||
private Duration timeUsed;
|
||||
|
||||
public SortResult(int[] a, long c, long s, Duration t){
|
||||
public SortResult(String st, Integer[] a, long c, long s, Duration t){
|
||||
sortType = st;
|
||||
sortedArray = a;
|
||||
if(c==0){
|
||||
comparisonsUsed = "None";
|
||||
@@ -41,11 +43,32 @@ public class SortResult {
|
||||
timeUsed = t;
|
||||
}
|
||||
|
||||
public SortResult(int [] a, Duration t){
|
||||
public SortResult(String st, Integer[] a, Duration t){
|
||||
sortType = st;
|
||||
sortedArray = a;
|
||||
timeUsed = t;
|
||||
comparisonsUsed = "Unknown";
|
||||
swapsUsed = "Unknown";
|
||||
}
|
||||
|
||||
public String getSortType(){
|
||||
return sortType;
|
||||
}
|
||||
|
||||
public Integer[] getSortedArray(){
|
||||
return sortedArray;
|
||||
}
|
||||
|
||||
public Duration getTimeUsed(){
|
||||
return timeUsed;
|
||||
}
|
||||
|
||||
public String getComparisonsUsed(){
|
||||
return comparisonsUsed;
|
||||
}
|
||||
|
||||
public String getSwapsUsed(){
|
||||
return swapsUsed;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user