package com.gildedrose;

class GildedRose {
    Item[] items;

    public GildedRose(Item[] items) {
        this.items = items;
    }

    private void decreaseQuality(Item item) {
        if (item.quality <= 0) return; 
        item.quality--;
    }

    private void increaseQuality(Item item) {
        if (item.quality >= 50) return; 
        item.quality++;
    }
    
    public void updateQuality() {
        for (int i = 0; i < items.length; i++) {
            Item currentItem = items[i];
            
			if (currentItem.name.equals("Aged Brie") || currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
        			increaseQuality(currentItem);
            } else {
                if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

                } else {
                    decreaseQuality(currentItem);
                }
            }

            if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                if (currentItem.sellIn < 11) {
            			increaseQuality(currentItem);
                }
                if (currentItem.sellIn < 6) {
            			increaseQuality(currentItem);
                }
            }
            
            if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

            } else {
                currentItem.sellIn--;
            }

            if (currentItem.sellIn < 0) {
                if (currentItem.name.equals("Aged Brie")) {
        				increaseQuality(currentItem);
                } else {
                    if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                        currentItem.quality = 0;
                    } else {
                        if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

                        } else {
                            decreaseQuality(currentItem);
                        }
                    }
                }
            }
        }
    }
}

@@ -684,34 +684,16 @@
  %7D else 
-%7B%0A                
 if (curr
@@ -738,36 +738,32 @@
  Ragnaros%22)) %7B%0A%0A
-    
             %7D el
@@ -775,36 +775,32 @@
                 
-    
 decreaseQuality(
@@ -813,34 +813,16 @@
 tItem);%0A
-                %7D%0A
         
@@ -1477,38 +1477,16 @@
  %7D else 
-%7B%0A                    
 if (curr
@@ -1565,36 +1565,32 @@
                 
-    
 currentItem.qual
@@ -1598,20 +1598,16 @@
 ty = 0;%0A
-    
         
@@ -1625,34 +1625,8 @@
 lse 
-%7B%0A                        
 if (
@@ -1695,32 +1695,24 @@
             
-    
-    
 %7D else %7B%0A   
@@ -1704,32 +1704,24 @@
    %7D else %7B%0A
-        
             
@@ -1762,56 +1762,8 @@
 m);%0A
-                        %7D%0A                    %7D%0A
     

Convert each if/else in a sequence of if/else if/else at the same level of branching