- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 54字
- 2021-06-24 14:58:06
Accessor methods
There are only two variables that require accessor methods—sliderValue and poweredOn. Accessor methods for those variables are provided here:
// Accessor Methods
public int getSliderValue() {
return sliderValue;
}
public boolean hasPower () {
return poweredOn;
}
The accessor methods just shown can also be referred to as getter methods.
推薦閱讀
- SQL Server 2016 數(shù)據(jù)庫(kù)教程(第4版)
- MongoDB管理與開(kāi)發(fā)精要
- 工業(yè)大數(shù)據(jù)分析算法實(shí)戰(zhàn)
- WS-BPEL 2.0 Beginner's Guide
- 數(shù)據(jù)革命:大數(shù)據(jù)價(jià)值實(shí)現(xiàn)方法、技術(shù)與案例
- 網(wǎng)站數(shù)據(jù)庫(kù)技術(shù)
- ZeroMQ
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- 企業(yè)級(jí)容器云架構(gòu)開(kāi)發(fā)指南
- 探索新型智庫(kù)發(fā)展之路:藍(lán)迪國(guó)際智庫(kù)報(bào)告·2015(下冊(cè))
- Construct 2 Game Development by Example
- 智慧的云計(jì)算
- 新手學(xué)會(huì)計(jì)(2013-2014實(shí)戰(zhàn)升級(jí)版)
- 數(shù)據(jù)指標(biāo)體系:構(gòu)建方法與應(yīng)用實(shí)踐
- 企業(yè)大數(shù)據(jù)處理:Spark、Druid、Flume與Kafka應(yīng)用實(shí)踐