public class Archetype
Defines a set of component types for entity grouping. Entities are organized into archetypes for cache-efficient iteration and querying. Each archetype represents a unique combination of component types.
java.lang.Object > Archetype
Field Summary
index
Field index.
component
Field component.
typeClass
Field typeClass.
registry
Field registry.
minIndex
Field minIndex.
newLength
Field newLength.
oldLength
Field oldLength.
oldMinIndex
Field oldMinIndex.
oldMaxIndex
Field oldMaxIndex.
newCount
Field newCount.
archetype
Field archetype.
Method Detail
Archetype
private
Archetype
(final int minIndex, final int count, @Nonnull final ComponentType[] componentTypes)
Method Archetype.
- Parameters:
final intminIndexfinal intcount@Nonnull final ComponentTypecomponentTypes[]
getMinIndex
int
getMinIndex
()
Method getMinIndex.
count
int
count
()
Method count.
length
int
length
()
Method length.
get
?>
get
(final int index)
Method get.
- Parameters:
final intindex
isEmpty
boolean
isEmpty
()
Method isEmpty.
validateComponentType
Method validateComponentType.
- Parameters:
@Nonnull final ComponentTypecomponentType
IllegalArgumentException
new
IllegalArgumentException
("ComponentType is not in archetype: " + String.valueOf(componentType)
Method IllegalArgumentException.
- Parameters:
"ComponentType is not in archetype: " +String.valueOf(componentType
validateComponents
void
validateComponents
(@Nonnull final Component[] components, @Nullable final ComponentType> ignore)
Method validateComponents.
- Parameters:
@Nonnull final Componentcomponents[] @Nullable final ComponentTypeignore>
IllegalStateException
new
IllegalStateException
("Invalid component at index " + index + " expected null but found " + String.valueOf(component.getClass()
Method IllegalStateException.
- Parameters:
"Invalid component at index " + index + " expected null but found " +String.valueOf(component.getClass(
hasSerializableComponents
boolean
hasSerializableComponents
(@Nonnull final ComponentRegistry.Data data)
Method hasSerializableComponents.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
getSerializableArchetype
Method getSerializableArchetype.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
add
Archetype
add
(@Nonnull final Archetype archetype, @Nonnull final ComponentType componentType)
Method add.
- Parameters:
@Nonnull final Archetypearchetype@Nonnull final ComponentTypecomponentType
remove
Archetype
remove
(@Nonnull final Archetype archetype, @Nonnull final ComponentType componentType)
Method remove.
- Parameters:
@Nonnull final Archetypearchetype@Nonnull final ComponentTypecomponentType
requiresComponentType
Method requiresComponentType.
- Parameters:
@Nonnull final ComponentTypecomponentType
validate
void
validate
()
Method validate.
equals
boolean
equals
(@Nullable final Object o)
Method equals.
- Parameters:
@Nullable final Objecto
hashCode
int
hashCode
()
Method hashCode.
toString
String
toString
()
Method toString.
- See Also: