public void deleteLinkedlist1(int index1) { data1 list1 = findLink1(index1); if (index1 == 0) { list1 = current_address1.get_nextaddress1(); list1.set_prevaddress1(null); first_address1 = list1; } else { list1.get_nextaddress1().set_prevaddress1(list1.get_prevtaddress()); list1.get_prevtaddress().set_nextaddress1(list1.get_nextaddress1()); } datasize1--; }
public void addLinkedlist1(int data1) { if (current_address1 == null) { current_address1 = new data1(); first_address1 = current_address1; current_address1.set_data2(data1); } else { current_address1.set_nextaddress1(); moveData1 = current_address1; current_address1 = current_address1.get_nextaddress1(); current_address1.set_prevaddress1(moveData1); current_address1.set_data2(data1); } datasize1++; }