Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.   public static MintKeyObject /*Object*/ producer(int objectType)
  2.   {
  3.     switch (objectType)
  4.     {
  5.       case 0:
  6.         // return new MintEvent();
  7.         mint.api.domain.schedule.MintCourse r = new mint.api.domain.schedule.MintCourse();
  8.         return r;
  9.       case 1:
  10.         // return new MintAssignment();
  11.         MintContinuity c = new MintContinuity();
  12.         c.setDescription("foobar");
  13.         return c;
  14.       case 2:
  15.         // return new MintEvent() {{ setKey(1234L); }};
  16.         r = new mint.api.domain.schedule.MintCourse();
  17.         r.setKey(1234L);
  18.         r.setScheduleId("bla");
  19.         return r;
  20.       default:
  21.         throw new IllegalArgumentException("unsupported object type");
  22.     }
  23.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement