Class ContextFastSingleGrid<T>

    • Constructor Detail

      • ContextFastSingleGrid

        public ContextFastSingleGrid​(String name,
                                     GridAdder<T> adder,
                                     GridPointTranslator translator,
                                     int... size)
        Constructs this space with the specified name, adder, translator, accessor and size. The size is the size of the space meaning [3, 3] is a 3x3 space.
        name - the name of the space
        size - the dimensions of the space
    • Method Detail

      • eventOccured

        public void eventOccured​(ContextEvent<T> evt)
        If the event is an add this will put the object at the (0, 0, ..., 0) location. If it is a remove it will remove the object from its location map.
        Specified by:
        eventOccured in interface ContextListener<T>
        evt - a ContextEvent that occurred to the context this is a part of
      • addFromContext

        protected void addFromContext​(T t)
      • addAll

        protected void addAll​(Context<T> context)