combine two or more arraylist in one arraylist - java

Trying to combine two ArrayList into one, below are the values of two List. W_VISIT describes how many time particular HOST_ADDR address visited the web page.
HOST_ADDR -- W_VISIT
10.202.64.52 -- 11
10.202.64.78 -- 5
10.202.64.34 -- 1
HOST_ADDR -- W_VISIT
10.146.84.179 -- 1
10.202.64.52 -- 16
10.202.64.78 -- 18
All I am trying do here is combine both array list(kind of full outer join in SQL)
Output:
10.202.64.52 -- 11 -- 16
10.202.64.78 -- 5 -- 18
10.202.64.34 -- 1 -- 0
10.146.84.179 -- 0 -- 1
and so on..
public List getData()
{
data=new ArrayList();
ResultSet rs=ps.executeQuery();
while(rs.next()){
fetchValue=new NewClass();
fetchValue.setCount(rs.getInt(1));
fetchValue.setIp(rs.getString(2));
data.add(fetchValue);
}
return data;
}
public List get2Data()
{
data1=new ArrayList();
ResultSet rs=ps.executeQuery();
while(rs.next()){
fetchValue1=new NewClass();
fetchValue1.setCount(rs.getInt(1));
fetchValue1.setIp(rs.getString(2));
data1.add(fetchValue1);
}
return data1;
}
public List get3Data(){
//what to do here... not looking for code, just seeking a way to do
}

Create a new class called IpDetails say with three fields
ip
count 1 --give some good name
count 2
Define a map at Object level with ip as key and IpDetails as value.
When you fire your first query, populate the map by creating IpDetails object and populating things you get from Query and leave count 2 as uninitialized.
When you fire second query do the following:
From the map, get the corresponding IpDetails given ip address as key.
populate count2 field now
And now you have all three details in place, so you can pass on values to the GUI as collections of IpDetails.

Maybe you can output the result like this?
And also you can take an Object result from this.
public void tester() {
final List<NewClass> list1 = new ArrayList<NewClass>();
NewClass fetchValue11 = new NewClass();
fetchValue11.setIp("10.202.64.52");
fetchValue11.setCount(11);
NewClass fetchValue12 = new NewClass();
fetchValue12.setIp("127.0.0.1");
fetchValue12.setCount(5);
NewClass fetchValue13 = new NewClass();
fetchValue13.setIp("0:0:0:0:0:0:1");
fetchValue13.setCount(1);
list1.add(fetchValue11);
list1.add(fetchValue12);
list1.add(fetchValue13);
final List<NewClass> list2 = new ArrayList<NewClass>();
NewClass fetchValue21 = new NewClass();
fetchValue21.setIp("10.202.64.52");
fetchValue21.setCount(16);
NewClass fetchValue22 = new NewClass();
fetchValue22.setIp("127.0.0.1");
fetchValue22.setCount(0);
NewClass fetchValue23 = new NewClass();
fetchValue23.setIp("0:0:0:0:0:0:1");
fetchValue23.setCount(4);
NewClass fetchValue24 = new NewClass();
fetchValue24.setIp("10.202.64.78");
fetchValue24.setCount(18);
list2.add(fetchValue21);
list2.add(fetchValue22);
list2.add(fetchValue23);
list2.add(fetchValue24);
List<NewClass> list = new ArrayList<NewClass>();
list.addAll(list2);
list.addAll(list1);
System.out.println(list.size());
Collections.sort(list, new Comparator<NewClass>() {
public int compare(final NewClass o1, final NewClass o2) {
if (o1.getIp().equals(o2.getIp())) {
System.out.println(o1.getIp() + "---" + o1.getCount() + "---" + o2.getCount());
}
return o1.getIp().compareTo(o2.getIp());
}
});
}

What about this one?
public List get3Data() {
final List<NewClass[]> data3 = new ArrayList<NewClass[]>();
List<NewClass> list = new ArrayList<NewClass>();
list.addAll(data);
list.addAll(data1);
Collections.sort(list, new Comparator<NewClass>() {
public int compare(final NewClass o1, final NewClass o2) {
if (o1.getIp().equals(o2.getIp())) {
data3.add(new NewClass[]{o1, o2});
}
return o1.getIp().compareTo(o2.getIp());
}
});
return data3;
}

Related

Java populate ComboBox

I would like to populate ComboBox in Java, but:
when I use array of strings, I must define the size of array before (this is disadvantage),
when I would like to use ArrayList, I cant have empty items with null values or I cant skip ids:
ArrayList<String> a = new ArrayList<String>();
a.add(0, "hahah");
a.add(1, "bleeeee");
a.add(5, "cleeeee"); //this makes an error, when I change index to 2, it works
JComboBox supplierComboBox = new JComboBox(a.toArray());
My array is for example:
[1] => "dog",
[5] => "mouse",
[8] => "cat".
(some ids missing).
THX.
You can't have an index of 5 without having indexes of 2, 3, and 4 as well. Java will either throw an exception at this, or it will silently fill all of the skipped indexes with null values. So just add values at 2, 3, and 4 and it should work. Make sure that there are no other skipped indexes as well.
To remove all the null values in a List, try this code:
public class RemoveNullValues {
private ArrayList<String> test = new ArrayList<String>();
public RemoveNullValues() {
test.add("0");
test.add(null);
test.add("1");
test.add(null);
test.add(null);
test.add("2");
test.add("3");
test.add("4");
test.add(null);
test.add("5");
System.out.println("Before: " + test);
//Java 7 and below method:
test.removeAll(Collections.singleton(null));
//Java 8+ method:
test.removeIf(Objects::isNull);
System.out.println("After: " + test);
}
public static void main(String[] args) {
new RemoveNullValues();
}
}
You can instantiate a combobox without children
JComboBox supplierComboBox = new JComboBox();
and then add the children in a for cycle:
ArrayList<String> a = new ArrayList<String>();
a.add("hahah");
a.add("bleeeee");
a.add("cleeeee");
for (String value : a) {
supplierComboBox.addItem(value); // you can put every kind of object in "addItem"
}
Some examples (if you need the id field):
Using Map.Entry
ArrayList<Map.Entry<Integer, String>> a = new ArrayList<Map.Entry<Integer, String>>();
a.add(new AbstractMap.SimpleEntry<Integer, String>(0, "hahah"));
a.add(new AbstractMap.SimpleEntry<Integer, String>(1, "bleeeee"));
a.add(new AbstractMap.SimpleEntry<Integer, String>(5, "cleeeee"));
for (Map.Entry<Integer, String> value : a) {
supplierComboBox.addItem(value);
}
Using MyClass:
public class MyClass{
private Integer id;
private String value;
public MyClass(Integer id, String value) {
this.id = id;
this.value= value;
}
// Getters & Setters
}
and then:
ArrayList<MyClass> a = new ArrayList<MyClass>();
a.add(new MyClass(0, "hahah"));
a.add(new MyClass(1, "bleeeee"));
a.add(new MyClass(5, "cleeeee"));
for (MyClass value : a) {
supplierComboBox.addItem(value);
}

I dont understand what is missing in my code

import java.util.*;
public class CarProduct{
String color;
String modelname;
String price;
public CarProduct(String c, String m, String p){
color = c;
modelname = m;
price = p;
}
}
class HashMapApplication{
public static void main(String []ar){
ArrayList<CarProduct> arraylist1 = new ArrayList<CarProduct>();
ArrayList<CarProduct> arraylist2 = new ArrayList<CarProduct>();
ArrayList<CarProduct> arraylist3 = new ArrayList<CarProduct>();
HashMap<String,ArrayList> hashmap = new HashMap<String,ArrayList>();
CarProduct Tata = new CarProduct("black","12 Lakhs","Aria");
arraylist1.add(Tata);
hashmap.put("Tata",arraylist1);
CarProduct WolksWagen = new CarProduct("off white","10 Lakhs","Passat");
arraylist2.add(WolksWagen);
hashmap.put("WolksWagen",arraylist2);
CarProduct Mahindra = new CarProduct("white","15 Lakhs","XUV");
arraylist3.add(Mahindra);
hashmap.put("Mahindra",arraylist3);
//get(int index)
//map.get(id).add(value);
//hashmap.get("")
// this contains error i dont know how iterate it because the class is there and i need access each and every field in it
for (Entry<String, ArrayList<CarProduct>> entry : hashmap.entrySet()) {
System.out.print(entry.getKey()+" | ");
for(String property : entry.getValue()){
System.out.print(property+" ");
}
System.out.println();
}
}
}
I want to extract the values from hashmap.
Please help, the key is given and the value will be arraylist.
Please help to convert the object thing in string and in displaying each and every value using get method
import java.util.*;
public class CarProduct{
String color;
String modelname;
String price;
public CarProduct(String c, String m, String p){
color = c;
modelname = m;
price = p;
}
#Override
public String toString()
{
return "Model: " + modelname + " Colour:" + color + " Price:" + price ;
}
}
class HashMapApplication{
public static void main(String []ar){
List<CarProduct> arraylist1 = new ArrayList<CarProduct>();
List<CarProduct> arraylist2 = new ArrayList<CarProduct>();
List<CarProduct> arraylist3 = new ArrayList<CarProduct>();
Map<String,List<CarProduct>> hashmap = new HashMap<String, List<CarProduct>>();
CarProduct Tata = new CarProduct("black","12 Lakhs","Aria");
arraylist1.add(Tata);
hashmap.put("Tata",arraylist1);
CarProduct WolksWagen = new CarProduct("off white","10 Lakhs","Passat");
arraylist2.add(WolksWagen);
hashmap.put("WolksWagen",arraylist2);
CarProduct Mahindra = new CarProduct("white","15 Lakhs","XUV");
arraylist3.add(Mahindra);
hashmap.put("Mahindra",arraylist3);
for (Map.Entry<String, List<CarProduct>> entry : hashmap.entrySet()) {
System.out.print(entry.getKey()+" | ");
for(CarProduct property : entry.getValue()){
System.out.print(property+" ");
}
System.out.println();
}
}
}
So there's a couple of things to correct.
Firstly the hashmap, we need to make sure the hashmap is properly typed so we've specified the type of the ArrayList otherwise we'll only be able to get Objects.
Secondly the for loop. Here we need to change the inner for loop so that it loops on CarProduct's and not Strings.
Lastly for printing the property we need to override the toString() method in CarProduct this will allow you to get the car product and put it directly in a System.out.print() as you have done.
One thing I should add is that currently you are putting the inputs into your initializer in the wrong order. Your constructor specifies color, model, price but you're using your initializer as color, price, model.
EDIT: Made the lists and maps more generic to reflect the comments on the original question
for (Map.Entry<String, ArrayList> entry : hashmap.entrySet()) {
System.out.print(entry.getKey()+" | ");
//get the arraylist first.
ArrayList<CarProduct> arrayList = entry.getValue();
for(CarProduct x: arrayList){
//display the carProduct
}
System.out.println();
}
You are basically trying to print ArrayList.toString() which will not give proper response. Try to first get the arraylist and then iterate over its contents.

How to sort Integers without making them an Array or List in Java?

Let's say I have an array of Employee objects.
A single employee object has parameters such as : name, age and department.
I need to sort the Employee objects by their age.
I know how to do this except for one part.
When I use the compareTo method, I need to specify how to sort the integers.
How would I do this with making them an array of integers or list?
EDIT
Here is my code to further clarify what I need to do.
public class Company {
public static void main(String [] args){
Employee[] e = new Employee[13];
PrimeAgeChecker p = new PrimeAgeChecker();
Department d = new Department();
e[0] = new Employee("Counting Guru",55,"Accounting");
e[1] = new Employee("Counting Pro",45,"Accounting");
e[2] = new Employee("Counting Savvy",40,"Accounting");
e[3] = new Employee("Counting Novice",25,"Accounting");
e[4] = new Employee("Sales Guru",50,"Marketing");
e[5] = new Employee("Sales Pro",48,"Marketing");
e[6] = new Employee("Sales Savvy",38,"Marketing");
e[7] = new Employee("Hiring Guru",58,"Human Resrouces");
e[8] = new Employee("Hiring Pro",47,"Human Resrouces");
e[9] = new Employee("Hacking Pro",47,"Information Systems");
e[10] = new Employee("Hacking Guru",51,"Information Systems");
e[11] = new Employee("Hacking Savvy",38,"Information Systems");
e[12] = new Employee("Hacking Novice",23,"Information Systems");
for(int i = 0;i<e.length;i++){
System.out.println(e[i] + " " + p.isPrime(e[i]));
}//end
}//end main
}//end company
As you can see, each Employee object takes 3 parameters.
I need to sort them by the integer which is their age.
You should have a look at the sort method of the Arrays class
public static <T> void sort(T[] a, Comparator<? super T> c)
You will need to create a Comparator to tell it how to order your employees
http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html
Similarly, if you had a List or other type of Collection you could use the sort method of Collections

Iterating through an array List and creating new ArrayLists when values are different, is this even possible?

I am fairly new to Java and I have stumbled across a problem I cannot figure out for the life of me. First let me explain what I am trying to do then I will show you the code I have so far.
I have a webservice that returns an array of arrays(which include company and lines of business strings). I wish to transform this into a string list, which I did in the first line of code below. Then I wish to Iterate through the list and every I come across a different value for company, I want to create a new ArrayList and add the associated line of business to the new list. Example output of webservice: 80,80,64,64 (this is presorted so the same companies will always be grouped together) the associated lobs would be 1,2,3,4 respectively. What I want: arraylist[0]: 1,2 arrayList[1]: 3,4
What I have so far:
List coList = Arrays.asList(coArray);
//create list of lists
List<List<String>> listOfLists = new ArrayList<List<String>>();
String cmp = "";
for (int i=0;i<coList.size();i++){//loop over coList and find diff in companies
String currentCo = ((__LOBList)coList.get(i)).getCompany();
String currentLob = ((__LOBList)coList.get(i)).getLobNum();
if(i<coArray.length-1){
String nextCo = ((__LOBList)coList.get(i+1)).getCompany();
if((currentCo.equals(nextCo))){
//do nothing companies are equal
}else{
log("NOT EQUAL"); //insert logic to create a new array??
ArrayList<String> newList = new ArrayList<String>();
// for(int j=0;j<coList.size();j++){
newList.add( ((__LOBList)coList.get(i)).getLobNum());
// }
for(int k=0; k<listOfLists.size();k++){//loop over all lists
for(int l=0;l<listOfLists.get(k).size();l++){ //get first list and loop through
}
listOfLists.add(newList);
}
}
}
}
My problem here is that it is not adding the elements to the new string array. It does correctly loop through coList and I put a log where the companies are not equal so I do know where I need to create a new arrayList but I cannot get it to work for the life of me, please help!
Yes you can do this but it's really annoying to write in Java. Note: This is a brain dead simple in a functional programming language like Clojure or Haskell. It's simply a function called group-by. In java, here's how I'd do this:
Initialize a List of Lists.
Create a last pointer that is a List. This holds the last list you've added to.
Iterate the raw data and populate into the last as long as "nothing's changed". If something has changed, create a new last.
I'll show you how:
package com.sandbox;
import java.util.ArrayList;
import java.util.List;
public class Sandbox {
public static void main(String[] args) {
ArrayList<String> rawInput = new ArrayList<String>();
rawInput.add("80");
rawInput.add("80");
rawInput.add("60");
rawInput.add("60");
new Sandbox().groupBy(rawInput);
}
public void groupBy(List<String> rawInput) {
List<List<String>> output = new ArrayList<>();
List<String> last = null;
for (String field : rawInput) {
if (last == null || !last.get(0).equals(field)) {
last = new ArrayList<String>();
last.add(field);
output.add(last);
} else {
last.add(field);
}
}
for (List<String> strings : output) {
System.out.println(strings);
}
}
}
This outputs:
[80, 80]
[60, 60]
Of course, you can do what the other guys are suggesting but this changes your data type. They're suggesting "the right tool for the job", but they're not mentioning guava's Multimap. This will make your life way easier if you decide to change your data type to a map.
Here's an example of how to use it from this article:
public class MutliMapTest {
public static void main(String... args) {
Multimap<String, String> myMultimap = ArrayListMultimap.create();
// Adding some key/value
myMultimap.put("Fruits", "Bannana");
myMultimap.put("Fruits", "Apple");
myMultimap.put("Fruits", "Pear");
myMultimap.put("Vegetables", "Carrot");
// Getting the size
int size = myMultimap.size();
System.out.println(size); // 4
// Getting values
Collection<string> fruits = myMultimap.get("Fruits");
System.out.println(fruits); // [Bannana, Apple, Pear]
Collection<string> vegetables = myMultimap.get("Vegetables");
System.out.println(vegetables); // [Carrot]
// Iterating over entire Mutlimap
for(String value : myMultimap.values()) {
System.out.println(value);
}
// Removing a single value
myMultimap.remove("Fruits","Pear");
System.out.println(myMultimap.get("Fruits")); // [Bannana, Pear]
// Remove all values for a key
myMultimap.removeAll("Fruits");
System.out.println(myMultimap.get("Fruits")); // [] (Empty Collection!)
}
}
It sounds to me like a better choice would be a Map of Lists. Let the company ID be the key in the Map and append each new item for that company ID to the List that's the value.
Use the right tool for the job. Arrays are too low level.
Create a Map<String, List<Bussiness>>
Each time you retrieve a company name, first check if the key is already in the map. If it is, retrieve the list and add the Bussiness object to it. If it is not, insert the new value when a empty List and insert the value being evaluated.
try to use foreach instead of for
just like
foreach(List firstGroup in listOfLists)
foreach(String s in firstGroup)
............
Thanks for the input everyone!
I ended up going with a list of lists:
import java.util.*;
import search.LOBList;
public class arraySearch {
/**
* #param args
*/
public static void main(String[] args) {
LOBList test = new LOBList();
test.setCompany("80");
test.setLOB("106");
LOBList test1 = new LOBList();
test1.setCompany("80");
test1.setLOB("601");
LOBList test2 = new LOBList();
test2.setCompany("80");
test2.setLOB("602");
LOBList test3 = new LOBList();
test3.setCompany("90");
test3.setLOB("102");
LOBList test4 = new LOBList();
test4.setCompany("90");
test4.setLOB("102");
LOBList test5 = new LOBList();
test5.setCompany("100");
test5.setLOB("102");
LOBList BREAK = new LOBList();
BREAK.setCompany("BREAK");
BREAK.setLOB("BREAK");
BREAK.setcompany_lob("BREAK");
// create arraylist
ArrayList<LOBList> arlst=new ArrayList<LOBList>();
// populate the list
arlst.add(0,test);
arlst.add(1,test1);
arlst.add(2,test2);
arlst.add(3,test3);
arlst.add(4,test4);
arlst.add(5,test5);
//declare variables
int idx = 0;
String nextVal = "";
//loops through list returned from service, inserts 'BREAK' between different groups of companies
for(idx=0;idx<arlst.size();idx++){
String current = arlst.get(idx).getCompany();
if(idx != arlst.size()-1){
String next = arlst.get(idx+1).getCompany();
nextVal = next;
if(!(current.equals(next))){
arlst.add(idx+1,BREAK);
idx++;
}
}
}
//add last break at end of arrayList
arlst.add(arlst.size(),BREAK);
for(int i=0;i<arlst.size();i++){
System.out.println("co:" + arlst.get(i).getCompany());
}
//master array list
ArrayList<ArrayList<LOBList>> mymasterList=new ArrayList<ArrayList<LOBList>>();
mymasterList = searchListCreateNewLists(arlst);
//print log, prints all elements in all arrays
for(int i=0;i<mymasterList.size();i++){
for(int j=0;j<mymasterList.get(i).size();j++){
System.out.println("search method: " + mymasterList.get(i).get(j).getCompany());
}
System.out.println("end of current list");
}
}
//method to loop over company array, finds break, creates new array list for each company group,
//adds this to a list of lists(masterList)
public static ArrayList<ArrayList<LOBList>> searchListCreateNewLists(ArrayList<LOBList> list){
ArrayList<ArrayList<LOBList>> masterList=new ArrayList<ArrayList<LOBList>>();
int end = 0;
int start = 0;
int index = 0;
for(int i=0;i<list.size();i++){
if(list.get(i).getCompany().equals("BREAK")){
end = i;//end is current index
masterList.add(new ArrayList<LOBList>());
for(int j = start;j<end;j++){
masterList.get(index).add(list.get(j));
}
index++;
start = i+1;
}
}
return masterList;
}
}
The output is:
search method: 80
search method: 80
search method: 80
end of current list
search method: 90
search method: 90
end of current list
search method: 100
end of current list
So all company LOBList objects with Company: 80, are grouped together in a list, as are 90 and 100.
To iterate through the list you can use
ListIterator litr = coList.listIterator();
while(litr.hasNext()){
}

Simple ArrayList remove identical content

I have a very weird problem, And I want to do it extremely efficient way. In my app milliseconds count..
I have four ArrayLists of Strings
title desc, price, usageArray;
The first three contains data where as usageArray contains data and "NONE" at some places e.g
UsageArray
a b c NONE D NONE
etc
I want to remove the "NONE" From usageArray in such a way that e.g let the index of First NONE is 3 then the third element in title, desc and price is also remove.
How can I do this in extremely efficient way
First of all, I'll suggest you to create a class, say, Book, containing all those attributes and have a List<Book>, instead of having 4 different list for all of them.
P.S. : In general, whenever you see yourself modifying or working with multiple Lists in parallel, that is an indication that it's time to create a new class.
class Book {
String title;
String desc;
BigDecimal price;
String usage;
}
Then you have a list like this:
List<Book> books;
Now, to remove all the indices where usage is NULL, is as easy as:
ListIterator<Book> iterator = books.listIterator();
while (iterator.hasNext()) {
Book book = iterator.next();
if (book.getUsage().equals("NULL")) {
iterator.remove();
}
}
Also, wherever you are having "Null" as your string value, you should consider changing it to null.
Note: You should pay attention while removing elements from your List. You should always use an iterator while doing that.
See also:
Iterating through a Collection, avoiding ConcurrentModificationException when removing in loop
This is tested code.
public class mainclass {
public static void main(String ar[])
{
List<Integer> indexes = new ArrayList<Integer>();
List<String> title = new ArrayList<String>();
title.add("title 1");
title.add("title 2");
title.add("title 3");
List<String> desc = new ArrayList<String>();
desc.add("desc 1");
desc.add("desc 2");
desc.add("desc 3");
List<String> price = new ArrayList<String>();
price.add("price 1");
price.add("price 2");
price.add("price 3");
List<String> usageArray = new ArrayList<String>();
usageArray.add("usage 1");
usageArray.add("NONE");
usageArray.add("usage 1");
for (String string : usageArray) {
if(string.equalsIgnoreCase("NONE"))
{
indexes.add(usageArray.indexOf(string));
}
}
for (Integer index : indexes) {
price.remove(index);
desc.remove(index);
title.remove(index);
usageArray.remove(index);
}
}
}
Try this
int index = 0;
for (int i = 0; i < usageArray.size(); i++) {
if (usageArray.get(i).contains("NONE")) {
index=usageArray.indexOf("NONE");
usageArray.remove(index);
title.remove(index);
desc.remove(index);
price.remove(index);
i--;
}
}
This (as usual) depends. How big is your data set? Have you tested a basic approach and seen that it takes too much time? Simple LinkedLists for example are more efficient (compared to ArrayList) when it comes to removal. What do you want to end up with, a data structure that is fast for looking up things in what way? By index? By a key?
What do you need to be fast, the actual filtering or afterwards when you are done?
Multiple ways of doing this even in simple cases. What about merging into into one object with fields for each column:
class Data {
String title;
String desc;
String price;
String usage;
}
And then:
LinkedList<Data> allData = ...;
for (Iterator iter=allData.iterator();iter.hasNext();) {
Data data = iter.next();
if ("NONE".equals(data.usage)) { //see note about using something else here
iter.remove();
}
}
//allData is now cleaned of any entries with USAGE of NONE
Usually quicker than if using a ArrayList, certainly quicker than using multiple lists etc etc. But again depends.
Might for example want to have the usage in a separate class depending on your data modelling needs.
For further performance regardless of algorithm (which is the important part so only for fun, always measure!) consider:
Make usage an enum or int for more efficient comparison or a
String constant so don't need equals(), can instead use usage == NONE
check the Following Code,
public static void main(String ar[])
{
List<String> title = new ArrayList<String>();
title.add("title 1");
title.add("title 2");
title.add("title 3");
List<String> desc = new ArrayList<String>();
desc.add("desc 1");
desc.add("desc 2");
desc.add("desc 3");
List<String> price = new ArrayList<String>();
price.add("price 1");
price.add("price 2");
price.add("price 3");
List<String> usageArray = new ArrayList<String>();
usageArray.add("usage 1");
usageArray.add("NONE");
usageArray.add("usage 1");
int index = -1;
for (String string : usageArray) {
if(string.equalsIgnoreCase("NONE"))
{
index = usageArray.indexOf(string);
usageArray.remove(string);
price.remove(index);
desc.remove(index);
title.remove(index);
}
}
}

Categories