// Path: src/main/java/com/amanvishnani/sim8085/domain/Flag.java
// public enum Flag {
//     S, Z, Ac, P, Cy;
// }
// 
// 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/IOperationResult.java
// public interface IOperationResult {
//     IData getData();
//     IFlags getFlags();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IRegister.java
// public interface IRegister extends IData {
//     void update(IData data);
// }


import com.amanvishnani.sim8085.domain.Flag;
import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IOperationResult;
import com.amanvishnani.sim8085.domain.IRegister;
import java.util.Objects;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.amanvishnani.sim8085.domain.Impl;



/**
 *
 * @author Aman Vishnani
 */
public class Data implements IData {

    String dataValue;

    public Data(String dataValue) {
        this.setDataValue(dataValue);
    }
    
    @Override
    public String hexValue() {
        return getDataValue();
    }

    @Override
    public Integer intValue() {
        return Integer.parseInt(dataValue, 16);
    }

    @Override
// Path: src/main/java/com/amanvishnani/sim8085/domain/Flag.java
// public enum Flag {
//     S, Z, Ac, P, Cy;
// }
// 
// 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/IOperationResult.java
// public interface IOperationResult {
//     IData getData();
//     IFlags getFlags();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IRegister.java
// public interface IRegister extends IData {
//     void update(IData data);
// }


// Path: src/main/java/com/amanvishnani/sim8085/domain/Impl/Data.java
import com.amanvishnani.sim8085.domain.Flag;
import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IOperationResult;
import com.amanvishnani.sim8085.domain.IRegister;
import java.util.Objects;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.amanvishnani.sim8085.domain.Impl;



/**
 *
 * @author Aman Vishnani
 */
public class Data implements IData {

    String dataValue;

    public Data(String dataValue) {
        this.setDataValue(dataValue);
    }
    
    @Override
    public String hexValue() {
        return getDataValue();
    }

    @Override
    public Integer intValue() {
        return Integer.parseInt(dataValue, 16);
    }

    @Override
    public IOperationResult add(IData data) {