Class EntityTypeUtil


  • public class EntityTypeUtil
    extends java.lang.Object
    • Constructor Detail

      • EntityTypeUtil

        public EntityTypeUtil()
    • Method Detail

      • toOrderedArray

        public static EntityType[] toOrderedArray​(EntityType[] values)
        Returns an ordered array with each index representing the actual entity id.
        Parameters:
        values - entity types
        Returns:
        ordered array with each index representing the actual entity id
      • getTypeFromId

        public static EntityType getTypeFromId​(EntityType[] values,
                                               int typeId,
                                               EntityType fallback)
        Returns the entity type from id, or the given fallback if out of bounds.
        Parameters:
        values - sorted entity type array
        typeId - entity type id
        fallback - fallback/base entity type
        Returns:
        entity type from id