dgadiraju
5/10/2017 - 12:00 AM

list-operations-sort.scala

os.sortBy(x => x.orderCustomerId)
os.sortWith((a, b) => {
  if(a.orderCustomerId > b.orderCustomerId)
    false
  else if(a.orderCustomerId < b.orderCustomerId)
    true
  else {
    if(a.orderId > b.orderId)
      false
    else
      true
  	}
  }
).foreach(println)