// Path: src/main/java/com/amanvishnani/sim8085/domain/IAddress.java
// public interface IAddress {
//     String hexValue();
//     Integer intValue();
//     IData getLSB();
//     IData getMSB();
//     IData getData();
//     void setData(IData data);
//     static IAddress ZERO = Address.from(0);
//     static IAddress FFFF = Address.from("FFFF");
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IData.java
// public interface IData {
//     IData ZERO = Data.from("00");
//     String hexValue();
//     Integer intValue();
//     IOperationResult add(IData data);
//     IOperationResult add(IData data, Integer carry);
//     IOperationResult minus(IData data);
//     IRegister toRegister();
//     public IData getLSB();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IMemory.java
// public interface IMemory {
//     IData getData(Integer intAddress);
//     IAddress getAddress(Integer intAddress);
//     String getHexData(Integer intAddress);
//     String getHexData(String hexAddress);
//     void setData(String hexAddress, String data);
//     void setData(Integer intAddress, String data);
//     void setData(IAddress address, String data);
//     void setData(IAddress address, IData data);
//     IMemorySlice getSlice(Integer start, Integer end);
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IMemorySlice.java
// public interface IMemorySlice {
//     String[] getHexDataArray();
// }


import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IMemory;
import com.amanvishnani.sim8085.domain.IMemorySlice;
import com.amanvishnani.sim8085.domain.IAddress;
        IAddress addr = Address.from(hexAddress);
        return getHexData(addr.intValue());
    }
    
    @Override
    public void setData(IAddress address, IData data) {
        address.setData(data);
        memory[address.intValue()] = address;
    }
    
    @Override
    public void setData(IAddress address, String data) {
        IData hexData = Data.from(data);
        address.setData(hexData);
        memory[address.intValue()] = address;
    }

    @Override
    public void setData(String hexAddress, String data) {
        IAddress addr = Address.from(hexAddress);
        setData(addr, data);
    }

    @Override
    public void setData(Integer intAddress, String data) {
        IAddress addr = Address.from(intAddress);
        setData(addr.hexValue(), data);
    }

    @Override
// Path: src/main/java/com/amanvishnani/sim8085/domain/IAddress.java
// public interface IAddress {
//     String hexValue();
//     Integer intValue();
//     IData getLSB();
//     IData getMSB();
//     IData getData();
//     void setData(IData data);
//     static IAddress ZERO = Address.from(0);
//     static IAddress FFFF = Address.from("FFFF");
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IData.java
// public interface IData {
//     IData ZERO = Data.from("00");
//     String hexValue();
//     Integer intValue();
//     IOperationResult add(IData data);
//     IOperationResult add(IData data, Integer carry);
//     IOperationResult minus(IData data);
//     IRegister toRegister();
//     public IData getLSB();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IMemory.java
// public interface IMemory {
//     IData getData(Integer intAddress);
//     IAddress getAddress(Integer intAddress);
//     String getHexData(Integer intAddress);
//     String getHexData(String hexAddress);
//     void setData(String hexAddress, String data);
//     void setData(Integer intAddress, String data);
//     void setData(IAddress address, String data);
//     void setData(IAddress address, IData data);
//     IMemorySlice getSlice(Integer start, Integer end);
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IMemorySlice.java
// public interface IMemorySlice {
//     String[] getHexDataArray();
// }


// Path: src/main/java/com/amanvishnani/sim8085/domain/Impl/Memory.java
import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IMemory;
import com.amanvishnani.sim8085.domain.IMemorySlice;
import com.amanvishnani.sim8085.domain.IAddress;

        IAddress addr = Address.from(hexAddress);
        return getHexData(addr.intValue());
    }
    
    @Override
    public void setData(IAddress address, IData data) {
        address.setData(data);
        memory[address.intValue()] = address;
    }
    
    @Override
    public void setData(IAddress address, String data) {
        IData hexData = Data.from(data);
        address.setData(hexData);
        memory[address.intValue()] = address;
    }

    @Override
    public void setData(String hexAddress, String data) {
        IAddress addr = Address.from(hexAddress);
        setData(addr, data);
    }

    @Override
    public void setData(Integer intAddress, String data) {
        IAddress addr = Address.from(intAddress);
        setData(addr.hexValue(), data);
    }

    @Override
    public IMemorySlice getSlice(Integer start, Integer end) {