⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mutablestock.java

📁 JStock是一个免费股市软件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * MutableStock.java
 *
 * Created on June 8, 2007, 9:58 PM
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Copyright (C) 2007 Cheok YanCheng <yccheok@yahoo.com>
 */

package org.yccheok.jstock.gui;

import org.yccheok.jstock.engine.*;

/**
 *
 * @author yccheok
 */
public class MutableStock {
    
    /** Creates a new instance of MutableStock */
    public MutableStock(Stock stock) {
        this.stock = stock;
    }
    
    public Stock getStock() {
        return this.stock;
    }
    
    public Code getCode() {
        return stock.getCode();
    }

    public Symbol getSymbol() {
        return stock.getSymbol();
    }

    public String getName() {
        return stock.getName();
    }

    public Stock.Board getBoard() {
        return stock.getBoard();
    }
    
    public Stock.Industry getIndustry() {
        return stock.getIndustry();
    }

    public double getOpenPrice() {
        return stock.getOpenPrice();
    }

    public double getLastPrice() {
        return stock.getLastPrice();
    }

    public double getHighPrice() {
        return stock.getHighPrice();
    }

    public double getLowPrice() {
        return stock.getLowPrice();
    }

    public int getVolume() {
        return stock.getVolume();
    }

    public double getChangePrice() {
        return stock.getChangePrice();
    }

    public double getChangePricePercentage() {
        return stock.getChangePricePercentage();
    }

    public int getLastVolume() {
        return stock.getLastVolume();
    }

    public double getBuyPrice() {
        return stock.getBuyPrice();
    }

    public int getBuyQuantity() {
        return stock.getBuyQuantity();
    }

    public double getSellPrice() {
        return stock.getSellPrice();
    }

    public int getSellQuantity() {
        return stock.getSellQuantity();
    }
    
    public double getSecondBuyPrice() {
        return stock.getSecondBuyPrice();
    }
    
    public int getSecondBuyQuantity() {
        return stock.getSecondBuyQuantity();
    }
    
    public double getSecondSellPrice() {
        return stock.getSecondSellPrice();
    }
    
    public int getSecondSellQuantity() {
        return stock.getSecondSellQuantity();
    }
    
    public double getThirdBuyPrice() {
        return stock.getThirdBuyPrice();
    }
    
    public int getThirdBuyQuantity() {
        return stock.getThirdBuyQuantity();
    }
    
    public double getThirdSellPrice() {
        return stock.getThirdSellPrice();
    }
    
    public int getThirdSellQuantity() {
        return stock.getThirdSellQuantity();
    }   
    
    public String toString() {
        return stock.toString();
    }

    /*
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
     */
    public void setOpenPrice(double openPrice) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                openPrice,
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;
    }
    
    public void setLastPrice(double lastPrice) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                lastPrice,
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;
    }
    
    public void setHighPrice(double highPrice) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                highPrice,
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;
    }

    public void setLowPrice(double lowPrice) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                lowPrice,
                stock.getVolume(),
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }

    public void setVolume(int volume) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                volume,
                stock.getChangePrice(),
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }

    public void setChangePrice(double changePrice) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                changePrice,
                stock.getChangePricePercentage(),
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }

    public void setChangePricePercentage(double changePricePercentage) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),
                changePricePercentage,
                stock.getLastVolume(),
                stock.getBuyPrice(),
                stock.getBuyQuantity(),
                stock.getSellPrice(),
                stock.getSellQuantity(),
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }

    public void setLastVolume(int lastVolume) {
        final Stock s = new Stock(
                stock.getCode(),
                stock.getSymbol(),
                stock.getName(),
                stock.getBoard(),
                stock.getIndustry(),
                stock.getOpenPrice(),
                stock.getLastPrice(),
                stock.getHighPrice(),
                stock.getLowPrice(),
                stock.getVolume(),
                stock.getChangePrice(),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -