forked from vanniktech/Emoji
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RecentEmoji.java
38 lines (34 loc) · 902 Bytes
/
RecentEmoji.java
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
package com.vanniktech.emoji;
import androidx.annotation.NonNull;
import com.vanniktech.emoji.emoji.Emoji;
import java.util.Collection;
/**
* Interface for providing some custom implementation for recent emojis.
*
* @since 0.2.0
*/
public interface RecentEmoji {
/**
* Returns the recent emojis. Could be loaded from a database, shared preferences or just hard
* coded.<br>
*
* This method will be called more than one time hence it is recommended to hold a collection of
* recent emojis.
*
* @since 0.2.0
*/
@NonNull Collection<Emoji> getRecentEmojis();
/**
* Should add the emoji to the recent ones. After calling this method, {@link #getRecentEmojis()}
* should return the emoji that was just added.
*
* @since 0.2.0
*/
void addEmoji(@NonNull Emoji emoji);
/**
* Should persist all emojis.
*
* @since 0.2.0
*/
void persist();
}