Skip to content

Commit

Permalink
使用 lombok 替代所有getter setter 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
guozilan authored and xuhongjuan committed Oct 8, 2017
1 parent 75b2cd8 commit 4b6a5dc
Show file tree
Hide file tree
Showing 81 changed files with 354 additions and 8,202 deletions.
17 changes: 17 additions & 0 deletions pom.xml
Expand Up @@ -69,6 +69,13 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -86,6 +93,16 @@
<directory>src/test/java</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
Expand Down
93 changes: 4 additions & 89 deletions src/main/java/com/github/abel533/echarts/AbstractData.java
Expand Up @@ -25,6 +25,8 @@
package com.github.abel533.echarts;

import com.github.abel533.echarts.code.Easing;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -34,6 +36,8 @@
*
* @author liuzh
*/
@Getter
@Setter
public abstract class AbstractData<T> implements Data<T>, java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
Expand Down Expand Up @@ -129,46 +133,6 @@ public T animationEasingUpdate(Easing animationEasingUpdate) {
return (T) this;
}

public Boolean getAnimation() {
return animation;
}

public void setAnimation(Boolean animation) {
this.animation = animation;
}

public Integer getAnimationDuration() {
return animationDuration;
}

public void setAnimationDuration(Integer animationDuration) {
this.animationDuration = animationDuration;
}

public Object getAnimationEasing() {
return animationEasing;
}

public void setAnimationEasing(Object animationEasing) {
this.animationEasing = animationEasing;
}

public Integer getAnimationDurationUpdate() {
return animationDurationUpdate;
}

public void setAnimationDurationUpdate(Integer animationDurationUpdate) {
this.animationDurationUpdate = animationDurationUpdate;
}

public Object getAnimationEasingUpdate() {
return animationEasingUpdate;
}

public void setAnimationEasingUpdate(Object animationEasingUpdate) {
this.animationEasingUpdate = animationEasingUpdate;
}

/**
* 获取data值
*/
Expand Down Expand Up @@ -212,23 +176,6 @@ public T clickable(Boolean clickable) {
this.clickable = clickable;
return (T) this;
}

/**
* 获取clickable值
*/
public Boolean getClickable() {
return clickable;
}

/**
* 设置clickable值
*
* @param clickable
*/
public void setClickable(Boolean clickable) {
this.clickable = clickable;
}

/**
* 获取hoverable值
*/
Expand All @@ -245,36 +192,4 @@ public T hoverable(Boolean hoverable) {
this.hoverable = hoverable;
return (T) this;
}

/**
* 获取hoverable值
*/
public Boolean getHoverable() {
return hoverable;
}

/**
* 设置hoverable值
*
* @param hoverable
*/
public void setHoverable(Boolean hoverable) {
this.hoverable = hoverable;
}

/**
* 获取data值
*/
public List getData() {
return data;
}

/**
* 设置data值
*
* @param data
*/
public void setData(List data) {
this.data = data;
}
}
148 changes: 4 additions & 144 deletions src/main/java/com/github/abel533/echarts/AbstractLabel.java
Expand Up @@ -26,6 +26,8 @@

import com.github.abel533.echarts.code.Position;
import com.github.abel533.echarts.style.TextStyle;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

Expand All @@ -34,6 +36,8 @@
*
* @author liuzh
*/
@Getter
@Setter
public abstract class AbstractLabel<T> implements Serializable {

private static final long serialVersionUID = -6908403517815789999L;
Expand Down Expand Up @@ -240,148 +244,4 @@ public T margin(Integer margin) {
this.margin = margin;
return (T) this;
}

/**
* 获取textStyle值
*/
public TextStyle getTextStyle() {
return textStyle;
}

/**
* 设置textStyle值
*
* @param textStyle
*/
public void setTextStyle(TextStyle textStyle) {
this.textStyle = textStyle;
}

/**
* 获取show值
*/
public Boolean getShow() {
return show;
}

/**
* 设置show值
*
* @param show
*/
public void setShow(Boolean show) {
this.show = show;
}

/**
* 获取position值
*/
public Object getPosition() {
return position;
}

/**
* 设置position值
*
* @param position
*/
public void setPosition(Object position) {
this.position = position;
}

/**
* 获取interval值
*/
public Object getInterval() {
return interval;
}

/**
* 设置interval值
*
* @param interval
*/
public void setInterval(Object interval) {
this.interval = interval;
}

/**
* 获取rotate值
*/
public Integer getRotate() {
return rotate;
}

/**
* 设置rotate值
*
* @param rotate
*/
public void setRotate(Integer rotate) {
this.rotate = rotate;
}

/**
* 获取clickable值
*/
public Boolean getClickable() {
return clickable;
}

/**
* 设置clickable值
*
* @param clickable
*/
public void setClickable(Boolean clickable) {
this.clickable = clickable;
}

/**
* 获取formatter值
*/
public Object getFormatter() {
return formatter;
}

/**
* 设置formatter值
*
* @param formatter
*/
public void setFormatter(Object formatter) {
this.formatter = formatter;
}

/**
* 获取margin值
*/
public Integer getMargin() {
return margin;
}

/**
* 设置margin值
*
* @param margin
*/
public void setMargin(Integer margin) {
this.margin = margin;
}

/**
* 获取color值
*/
public String getColor() {
return color;
}

/**
* 设置color值
*
* @param color
*/
public void setColor(String color) {
this.color = color;
}
}

0 comments on commit 4b6a5dc

Please sign in to comment.