Java tutorial
//package com.java2s; import java.util.Map; public class Main { private static final int MAX_SORTNR = 999; private static int getSortNr(Map<String, Integer> components, String component) { int sortnr = components.get(component); if (sortnr == 0) { // unsorted new entries get to the bottom return MAX_SORTNR; } return sortnr; } }