Neither Collection, nor Set works here as the order of elements is significant. This API is only used inside jps-builder and it is read-only. LinkedHashSet might be an ok solution =)