Class Matrix2<T>

  • All Implemented Interfaces:
    Iterable<T>

    public final class Matrix2<T>
    extends Object
    implements Iterable<T>
    Implements a 2D matrix
    • Constructor Detail

      • Matrix2

        public Matrix2()
      • Matrix2

        public Matrix2​(int x,
                       int y)
      • Matrix2

        public Matrix2​(Matrix2<T> other)
    • Method Detail

      • close

        public void close()
        Clears and frees internal state
      • clear

        public void clear()
        Clears but keeps internal state allocated
      • put

        public void put​(int x,
                        int y,
                        T obj)
      • remove

        public void remove​(int x,
                           int y)
      • removeAll

        public void removeAll()
      • get

        public T get​(int x,
                     int y)
      • contains

        public boolean contains​(HasPosition2 hasPosition)
      • contains

        public boolean contains​(int x,
                                int y)
      • allocate

        public void allocate​(int x,
                             int y)
      • rotate

        public void rotate​(Edge2 direction)
      • getDimension

        public CoordI2 getDimension()