blob: f93ec1329125fb23abd88459c464356fa791d4c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* Copyright 2013 Jesse Morgan
*/
package com.p4square.grow.model;
import java.util.UUID;
/**
*
* @author Jesse Morgan <jesse@jesterpm.net>
*/
public class MessageThread {
private String mId;
/**
* Create a new thread with a probably unique id.
*
* @return the new thread.
*/
public static MessageThread createNew() {
MessageThread t = new MessageThread();
t.setId(String.format("%x-%s", System.currentTimeMillis(), UUID.randomUUID().toString()));
return t;
}
/**
* @return The id the message.
*/
public String getId() {
return mId;
}
/**
* Set the id of the message.
* @param id The new message id.
*/
public void setId(String id) {
mId = id;
}
}
|