@Test public void testGetEmptyCollection() { WorldMap<String> map = new WorldMap<>(); Collection<String> objects = map.getAllAt(new WorldPosition(62135, -18635)); assertNotNull(objects); assertTrue(objects.isEmpty()); }
public Collection<T> getAllAt(WorldPosition position) { Collection<T> objects = positions.get(position); if (objects == null) { return Collections.emptyList(); } else { return Collections.unmodifiableCollection(objects); } }
WorldMap implements Updatable<PositionUpdate<T>> { public Collection<T> getAllAt(WorldPosition position) { Collection<T> objects = positions.get(position); if (objects == null) { return Collections.emptyList(); } else { return Collections.unmodifiableCollection(objects); } } }
WorldMap implements Updatable<PositionUpdate<T>> { public Collection<T> getAllAt(WorldPosition position) { Collection<T> objects = positions.get(position); if (objects == null) { return Collections.emptyList(); } else { return Collections.unmodifiableCollection(objects); } }  }
WorldMap implements Updatable<PositionUpdate<T>> { public Collection<T> getAllAt(WorldPosition position) { Collection<T> objects = positions.get(position); if (objects == null) { return Collections.emptyList(); } else { return Collections.unmodifiableCollection(objects); } }  void put(T object, WorldPosition newPosition); boolean remove(T object); WorldPosition getPosition(T object); Collection<T> getAllAt(WorldPosition position); @Override void listenUpdate(Listener<? super PositionUpdate<T>> listener); @Override void unlistenUpdate(Listener<? super PositionUpdate<T>> listener); }
WorldMap implements Updatable<PositionUpdate<T>> { public Collection<T> getAllAt(WorldPosition position) { Collection<T> objects = positions.get(position); if (objects == null) { return Collections.emptyList(); } else { return Collections.unmodifiableCollection(objects); } }  void put(T object, WorldPosition newPosition); boolean remove(T object); WorldPosition getPosition(T object); Collection<T> getAllAt(WorldPosition position); @Override void listenUpdate(Listener<? super PositionUpdate<T>> listener); @Override void unlistenUpdate(Listener<? super PositionUpdate<T>> listener);  }