mutablestock.java

来自「JStock是一个免费股市软件」· Java 代码 · 共 837 行 · 第 1/2 页

JAVA
837
字号
                stock.getChangePricePercentage(),
                lastVolume,
                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 setBuyPrice(double buyPrice) {
        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(),
                buyPrice,
                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 setBuyQuantity(int buyQuantity) {
        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(),
                buyQuantity,
                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 setSellPrice(double sellPrice) {
        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(),
                sellPrice,
                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 setSellQuantity(int sellQuantity) {
        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(),
                sellQuantity,
                stock.getSecondBuyPrice(),
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;
    }
    
    public void setSecondBuyPrice(double secondBuyPrice) {
        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(),
                secondBuyPrice,
                stock.getSecondBuyQuantity(),
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setSecondBuyQuantity(int secondBuyQuantity) {
        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(),
                secondBuyQuantity,
                stock.getSecondSellPrice(),
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setSecondSellPrice(double secondSellPrice) {
        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(),
                secondSellPrice,
                stock.getSecondSellQuantity(),
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setSecondSellQuantity(int secondSellQuantity) {
        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(),
                secondSellQuantity,
                stock.getThirdBuyPrice(),
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setThirdBuyPrice(double thirdBuyPrice) {
        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(),
                thirdBuyPrice,
                stock.getThirdBuyQuantity(),
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setThirdBuyQuantity(int thirdBuyQuantity) {
        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(),
                thirdBuyQuantity,
                stock.getThirdSellPrice(),
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setThirdSellPrice(double thirdSellPrice) {
        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(),
                thirdSellPrice,
                stock.getThirdSellQuantity(),
                stock.getCalendar()
                );
        
        this.stock = s;        
    }
    
    public void setThirdSellQuantity(int thirdSellQuantity) {
        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(),
                thirdSellQuantity,
                stock.getCalendar()
                );
        
        this.stock = s;        
    } 
    
    private Stock stock;
}

⌨️ 快捷键说明

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