Class SimpleMemoryCell

java.lang.Object
dev.zemco.codegame.execution.memory.SimpleMemoryCell
All Implemented Interfaces:
IMemoryCell

public class SimpleMemoryCell extends Object implements IMemoryCell
Simple memory cell that does not hold any value from the start.
Author:
Erik Zemčík
  • Constructor Details

    • SimpleMemoryCell

      public SimpleMemoryCell()
      Creates an instance of SimpleMemoryCell that holds no value.
  • Method Details

    • hasValue

      public boolean hasValue()
      Description copied from interface: IMemoryCell
      Returns if cell currently holds an integer value.
      Specified by:
      hasValue in interface IMemoryCell
      Returns:
      true if currently holds value else false
    • getValue

      public int getValue()
      Description copied from interface: IMemoryCell
      Returns currently held integer value of this cell.
      Specified by:
      getValue in interface IMemoryCell
      Returns:
      currently held value
    • setValue

      public void setValue(int value)
      Description copied from interface: IMemoryCell
      Sets value held by the cell.
      Specified by:
      setValue in interface IMemoryCell
      Parameters:
      value - value to set