📄 genericpropertyholder.java
字号:
package piytest.support;
import java.awt.Color;
import piy.FixedProperty;
/**
* This is a standard class which can be used to ensure
* properties are being handled correctly.
* For testing new property types, the relevent properties
* with those types can just be added to this class.
* All non-primitive property types should be initialised to null -
* the tests can reset them to whatever's needed.
*
* @author David Vivash
* @version 1.1, 26/4/01
*/
public class GenericPropertyHolder {
//primitive types
private boolean booleanValue = false;
private int intValue = 0;
private float floatValue = 0f;
//objects
private String stringValue = null;
private Color colorValue = null;
private FixedProperty fixed = null;
public boolean getBooleanValue() { return booleanValue; }
public void setBooleanValue(boolean val) { booleanValue = val; }
public int getIntValue() { return intValue; }
public void setIntValue(int val) { intValue = val; }
public float getFloatValue() { return floatValue; }
public void setFloatValue(float val) { floatValue = val; }
public String getStringValue() { return stringValue; }
public void setStringValue(String val) { stringValue = val; }
public Color getColorValue() { return colorValue; }
public void setColorValue(Color val) { colorValue = val; }
public FixedProperty getFixedProperty() { return fixed; }
public void setFixedProperty(FixedProperty val) { fixed = val; }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -