-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateTextFiles.java
183 lines (129 loc) · 5.34 KB
/
CreateTextFiles.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
package eveAPI;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class CreateTextFiles {
public static Map<Integer, String> createAllItems() throws Exception{
ArrayList<Integer> itemID = new ArrayList<Integer>();
ArrayList<String> typeName = new ArrayList<String>();
Map<Integer, String> allItems = new HashMap<Integer, String>();
Scanner sc3=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\typeID2.txt"));
while (sc3.hasNextLine()){
itemID.add(sc3.nextInt());
}
System.out.println(itemID);
sc3.close();
Scanner sc4=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\typeName2.txt"));
while (sc4.hasNextLine()){
typeName.add(sc4.nextLine());
}
System.out.println(typeName);
sc4.close();
System.out.println(typeName.size());
System.out.println(itemID.size());
for (int i = 0; i < itemID.size(); i++) {
allItems.put(itemID.get(i), typeName.get(i));
}
return allItems;
}
public static Map<Integer, String> createsolarSystems() throws Exception{
ArrayList<Integer> solarID = new ArrayList<Integer>();
ArrayList<String> solarName = new ArrayList<String>();
Map<Integer, String> solarSystem = new HashMap<Integer, String>();
Scanner sc10=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\solarSystemID.txt"));
while (sc10.hasNextLine()){
solarID.add(sc10.nextInt());
}
System.out.println(solarID);
sc10.close();
Scanner sc11=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\solarSystemName.txt"));
while (sc11.hasNextLine()){
solarName.add(sc11.nextLine());
}
System.out.println(solarName);
for (int i = 0; i < solarID.size(); i++) {
solarSystem.put(solarID.get(i), solarName.get(i));
}
sc11.close();
return solarSystem;
}
public static Map<Integer, String> createRegions() throws Exception{
ArrayList<Integer> regionID = new ArrayList<Integer>();
ArrayList<String> regionName = new ArrayList<String>();
Map<Integer, String> regions = new HashMap<Integer, String>();
Scanner sc14=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\RegionID.txt"));
while (sc14.hasNextLine()){
regionID.add(sc14.nextInt());
}
sc14.close();
Scanner sc13=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\RegionName.txt"));
while (sc13.hasNextLine()){
regionName.add(sc13.nextLine());
}
for (int i = 0; i < regionID.size(); i++) {
regions.put(regionID.get(i), regionName.get(i));
}
sc13.close();
return regions;
}
public static Map<Integer, Float> createAllVolumes() throws Exception{
ArrayList<Integer> allItemID = new ArrayList<Integer>();
ArrayList<Float> volumes = new ArrayList<Float>();
Map<Integer, Float> allVolumes = new HashMap<Integer, Float>();
System.out.println("true");
Scanner sc6=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\typeIDTotal.txt"));
while (sc6.hasNextInt()){
allItemID.add(sc6.nextInt());
}
sc6.close();
Scanner sc7=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\volumeID.txt"));
while (sc7.hasNextFloat()){
volumes.add(sc7.nextFloat());
}
sc7.close();
for (int i = 0; i < volumes.size(); i++) {
allVolumes.put(allItemID.get(i), volumes.get(i));
}
return allVolumes;
}
public static Map<Integer, Float> createjitaBuyList() throws Exception{
ArrayList<Float> jitabuyPrices = new ArrayList<Float>();
ArrayList<Integer> jitaItemID = new ArrayList<Integer>();
Map<Integer, Float> jitaBuyList = new HashMap<Integer, Float>();
Scanner sc=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\relevantID.txt"));
while (sc.hasNextInt()){
jitaItemID.add(sc.nextInt());
}
sc.close();
Scanner sc2=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\priceStream.txt"));
while (sc2.hasNextFloat()){
jitabuyPrices.add(sc2.nextFloat());
}
sc2.close();
System.out.println(jitabuyPrices);
for (int i = 0; i < jitaItemID.size(); i++) {
jitaBuyList.put(jitaItemID.get(i), jitabuyPrices.get(i));
}
System.out.println(jitaBuyList);
return jitaBuyList;
}
public static ArrayList<Integer> createIDList() throws Exception{
ArrayList<Integer> jitaItemID = new ArrayList<Integer>();
Scanner sc=new Scanner(new FileReader("C:\\Users\\Azazel\\Documents\\relevantID.txt"));
while (sc.hasNextInt()){
jitaItemID.add(sc.nextInt());
}
sc.close();
return jitaItemID;
}
public static String buyRegionURL() throws Exception{
String url = "®ion_ids=10000002&buysell=b";
return url;
}
public static String sellRegionURL() throws Exception{
String url3 = "http://api.eve-marketdata.com/api/item_orders2.json?char_name=SolariusLunarian&buysell=s®ion_ids=10000012,10000010,10000055,10000035,10000023,10000057,10000011,10000029,10000003,10000046,10000045,10000051,10000022,10000041,10000010,10000015,10000054,10000047,11000031,10000008&type_ids=";
return url3;
}
}