-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtil.java
More file actions
58 lines (48 loc) · 1.63 KB
/
Util.java
File metadata and controls
58 lines (48 loc) · 1.63 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package basicpwmanager;
import basicpwmanager.models.ACC_TYPE;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.File;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
/**
*
* @author HD
*/
public class Util {
/* Please set the following variables*/
public static File File = new File("secretFile");
/* End of configuration*/
public static Scanner sc = new Scanner(System.in);
public static GsonBuilder Builder = new GsonBuilder();
public static Gson Gson = Util.Builder.create();
/**
* The List of keys of Account Information that would be mapped later.
*/
public static List<ACC_TYPE> AccountStoringFormatKey = new ArrayList();
/**
* Iterator that lists the keys of Account Information that would be further
* mapped.
*/
public static Iterator<ACC_TYPE> AccountStoringFormatKeyItr;
/**
* Resets the iterator so that the cursor points back to the first key.
*/
public static void AccountStoringFormatKeyResetItr() {
AccountStoringFormatKeyItr = AccountStoringFormatKey.iterator();
}
static {
AccountStoringFormatKey.add(ACC_TYPE.SERVICE);
AccountStoringFormatKey.add(ACC_TYPE.USERNAME);
AccountStoringFormatKey.add(ACC_TYPE.PASSWORD);
AccountStoringFormatKey.add(ACC_TYPE.EMAIL);
AccountStoringFormatKey.add(ACC_TYPE.MISC);
}
}