OSDN Git Service

Merge branch いんきゅばすv2開発ブランチマージ
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / saccubus / prompt / DownloadProfileImpl.java
1 package yukihane.inqubus.saccubus.prompt;
2
3 import saccubus.worker.profile.CommentProfile;
4 import saccubus.worker.profile.LoginProfile;
5 import yukihane.inqubus.config.ConfigCommentProfile;
6 import yukihane.inqubus.config.ConfigDownloadProfile;
7
8 /**
9  * さきゅばすのコマンドプロンプト仕様にあわせるためのDownloadProfile実装
10  * @author yuki
11  */
12 class DownloadProfileImpl extends ConfigDownloadProfile {
13
14     private final LoginProfile loginProfile;
15     private final CommentProfile commentProfile;
16
17     DownloadProfileImpl(final String mail, final String pass, final long time) {
18         this.loginProfile = new LoginProfile() {
19
20             @Override
21             public String getMail() {
22                 return mail;
23             }
24
25             @Override
26             public String getPassword() {
27                 return pass;
28             }
29         };
30
31         this.commentProfile = new ConfigCommentProfile() {
32
33             @Override
34             public long getBackLogPoint() {
35                 return time;
36             }
37         };
38     }
39
40     @Override
41     public LoginProfile getLoginProfile() {
42         return loginProfile;
43     }
44
45     @Override
46     public CommentProfile getCommentProfile() {
47         return this.commentProfile;
48     }
49 }