All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fluxtion.server.lib.pnl.refdata.Symbol Maven / Gradle / Ivy

There is a newer version: 0.1.36
Show newest version
/*
 * SPDX-FileCopyrightText: © 2025 Gregory Higgins 
 * SPDX-License-Identifier: AGPL-3.0-only
 */

package com.fluxtion.server.lib.pnl.refdata;

import lombok.Data;

@Data
public final class Symbol {
    private String symbolName;
    private transient Instrument dealtInstrument;
    private transient Instrument contraInstrument;
    private String dealt;
    private String contra;

    public Symbol(String symbolName, Instrument dealtInstrument, Instrument contraInstrument) {
        this.symbolName = symbolName;
        this.dealtInstrument = dealtInstrument;
        this.contraInstrument = contraInstrument;
        this.dealt = dealtInstrument.instrumentName();
        this.contra = contraInstrument.instrumentName();
    }

    public Symbol(String symbolName, String dealtInstrument, String contraInstrument) {
        this(symbolName, new Instrument(dealtInstrument), new Instrument(contraInstrument));
    }

    public Symbol() {
    }

    public String symbolName() {
        return symbolName;
    }

    public Instrument dealtInstrument() {
        return dealtInstrument;
    }

    public Instrument contraInstrument() {
        return contraInstrument;
    }

    public void setDealt(String dealt) {
        this.dealt = dealt;
        this.dealtInstrument = new Instrument(dealt);
    }

    public void setContra(String contra) {
        this.contra = contra;
        this.contraInstrument = new Instrument(contra);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy