How to improve add() method in arraylist class
<p>I have a: </p>

<p>main class, 
sport class, 
sportList class 
and supplies enum class where variables look like this paired with shipping costs: BAT ("Bat", 13.99), Helmut ("Helmut", 4.99)...</p>

<p>As the user enters more supplies in the main class they are added to the arrayList (sportsList class) via add() method (these are basically gear objects to be shipped out) - if the arrayList is empty the gear is added...thereon in if the gear is added further the arrayList is searched for a duplicate of the same gear and when found the price of the gear is added to the existing value of the gear, which includes a shipping value that should only be added once per gear object.</p>

<p>This works ...but as I'm new to java, I wanted to see how this could be improved?
Thanks all!</p>

<pre><code>public void add (Sport sport) {

if (sportList.size() == 0){
        sportList.add(sport);
        sportList.get(0).addShipValue(sport.supplies.getCost());


    }else{
        for (int index = 0; index &lt;sportList.size() ; index++) {

            if (sportList.get(index).supplies.getName().equals(sport.supplies.getName())) {
                sportList.get(index).addShipValue(sport.getShipValue());

             break;

            }
            if(index == sportList.size() - 1) {
                sportList.add(sport);
                sportList.get(index + 1).addShipValue(sport.supplies.getCost());

                break;
            } 


        }
    }

}
</code></pre>