Advertisement
Guest User

Untitled

a guest
Jun 29th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.49 KB | None | 0 0
  1. abstract class Status extends Enumeration {
  2.   case class V(name: String, next: V*) extends Val(name) {
  3.     def nextList = next.toList.size
  4.   }
  5.   val NEW: V =
  6.     V("Nowy", PENDING)
  7.   val PENDING: V =
  8.     V("W trakcie", ACCEPTED, CANCELED)
  9.   val ACCEPTED: V =
  10.     V("Zaakceptowny", PENDING, ONHOLD)
  11.   val ONHOLD: V =
  12.     V("Wstrzymany", PENDING)
  13.   val CANCELED: V =
  14.     V("Anulowany")
  15.   val CLOSED: V =
  16.     V("Zakończone")
  17. }
  18.  
  19. //
  20.  
  21. info(PlainStatus.NEW.next.toList) -> List(null) ???
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement