Class ContextSpace<T>

    • Constructor Detail

      • ContextSpace

        public ContextSpace​(String name,
                            ContinuousAdder<T> adder,
                            PointTranslator translator,
                            double... 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.
        Parameters:
        name - the name of the space
        size - the dimensions of the space
      • ContextSpace

        public ContextSpace​(String name,
                            ContinuousAdder<T> adder,
                            PointTranslator translator,
                            double[] size,
                            double[] origin)
        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.
        Parameters:
        name - the name of the space
        size - the dimensions of the space
        origin - the origin 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>
        Parameters:
        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)