Class Grid1Dobject<T>

  • All Implemented Interfaces:

    public class Grid1Dobject<T>
    extends java.lang.Object
    implements Grid1D,
    a 1D Grid of objects
    See Also:
    Serialized Form
    • Field Detail

      • xDim

        public final int xDim
      • length

        public final int length
      • wrapX

        public boolean wrapX
    • Constructor Detail

      • Grid1Dobject

        public Grid1Dobject​(int xDim)
        creates a new Grid1Dobject of length xDim wtihout wraparound
      • Grid1Dobject

        public Grid1Dobject​(int xDim,
                            boolean wrapX)
        creates a new Grid1Ddouble of length xDim with optional wraparound
    • Method Detail

      • Get

        public T Get​(int x)
        gets the current field value at the specified index
      • GetField

        public T[] GetField()
      • Set

        public void Set​(int x,
                        T val)
        sets the current field value at the specified index
      • SetAll

        public void SetAll​(T val)
        sets all squares in current the field to the specified value
      • Xdim

        public int Xdim()
        Specified by:
        Xdim in interface Grid1D
      • Length

        public int Length()
        Specified by:
        Length in interface Grid1D
      • IsWrapX

        public boolean IsWrapX()
        Specified by:
        IsWrapX in interface Grid1D