private static List<WaypointType> orderedWaypointTypes(final boolean excludeInternalTypes, final boolean excludeGenerated) {
        // enforce an order for these types
        final Set<WaypointType> waypointTypes = new LinkedHashSet<>();
        waypointTypes.addAll(Arrays.asList(PARKING, TRAILHEAD, PUZZLE, STAGE, FINAL));
        // then add all remaining except "internal" types
        waypointTypes.addAll(EnumSet.complementOf(EnumSet.of(OWN, ORIGINAL, GENERATED)));
        if (!excludeInternalTypes) {
            //if wanted, add internal types at the end
            waypointTypes.addAll(EnumSet.of(OWN, ORIGINAL));
        }
        if (!excludeGenerated) {
            waypointTypes.add(GENERATED);
        }
        return Collections.unmodifiableList(new ArrayList<>(waypointTypes));
    }
inverse lookup of waypoint IDs<br/>
non public so that {@code null} handling can be handled centrally in the enum type itself
main/src/main/java/cgeo/geocaching/enumerations/WaypointType.java