mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 08:52:18 -05:00
Conversation: Added abstract method getType() and added constants TYPE_*
This commit is contained in:
parent
1c128cc682
commit
38564ad644
@ -40,6 +40,14 @@ public class Channel extends Conversation
|
||||
this.topic = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type of this conversation
|
||||
*/
|
||||
public int getType()
|
||||
{
|
||||
return Conversation.TYPE_CHANNEL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the channel's topic
|
||||
*
|
||||
|
@ -31,12 +31,23 @@ import java.util.LinkedList;
|
||||
*/
|
||||
public abstract class Conversation
|
||||
{
|
||||
public static final int TYPE_CHANNEL = 1;
|
||||
public static final int TYPE_QUERY = 2;
|
||||
public static final int TYPE_SERVER = 3;
|
||||
|
||||
private static final int HISTORY_SIZE = 30;
|
||||
|
||||
private LinkedList<Message> buffer = new LinkedList<Message>();
|
||||
private LinkedList<Message> history = new LinkedList<Message>();
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Get the type of conversation (channel, query, ..)
|
||||
*
|
||||
* @return See the constants: Conversation.TYPE_*
|
||||
*/
|
||||
public abstract int getType();
|
||||
|
||||
/**
|
||||
* Create a new conversation with the given name
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user