85 lines
2.6 KiB
Java
85 lines
2.6 KiB
Java
package com.ubt.jimu.controller.data.config;
|
|
|
|
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
|
import com.ubt.jimu.base.data.CtrlMotionType;
|
|
import com.ubt.jimu.controller.data.widget.SliderWidgetData;
|
|
|
|
@XStreamAlias("SliderConfig")
|
|
/* loaded from: classes.dex */
|
|
public class SliderConfig extends WidgetConfig<SliderWidgetData> {
|
|
private boolean directionDisclock;
|
|
private CtrlMotionType motionType;
|
|
private int servoID;
|
|
|
|
public SliderConfig() {
|
|
this.motionType = CtrlMotionType.servo;
|
|
this.directionDisclock = false;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof SliderConfig)) {
|
|
return false;
|
|
}
|
|
SliderConfig sliderConfig = (SliderConfig) obj;
|
|
return this.servoID == sliderConfig.servoID && this.directionDisclock == sliderConfig.directionDisclock && this.motionType == sliderConfig.motionType;
|
|
}
|
|
|
|
public CtrlMotionType getMotionType() {
|
|
return this.motionType;
|
|
}
|
|
|
|
public int getServoID() {
|
|
return this.servoID;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int i = this.servoID * 31;
|
|
CtrlMotionType ctrlMotionType = this.motionType;
|
|
return ((i + (ctrlMotionType != null ? ctrlMotionType.hashCode() : 0)) * 31) + (this.directionDisclock ? 1 : 0);
|
|
}
|
|
|
|
public boolean isDirectionDisclock() {
|
|
return this.directionDisclock;
|
|
}
|
|
|
|
public void setDirectionDisclock(boolean z) {
|
|
this.directionDisclock = z;
|
|
}
|
|
|
|
public void setMotionType(CtrlMotionType ctrlMotionType) {
|
|
this.motionType = ctrlMotionType;
|
|
}
|
|
|
|
public void setServoID(int i) {
|
|
this.servoID = i;
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.config.WidgetConfig
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(" servoID= " + getServoID());
|
|
sb.append(" motionType= " + getMotionType());
|
|
sb.append(" directionDisclock= " + isDirectionDisclock());
|
|
return super.toString() + sb.toString();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.config.WidgetConfig
|
|
public SliderWidgetData encapData() {
|
|
SliderWidgetData sliderWidgetData = new SliderWidgetData();
|
|
sliderWidgetData.setConfig(this);
|
|
return sliderWidgetData;
|
|
}
|
|
|
|
public SliderConfig(String str, CtrlMotionType ctrlMotionType, int i, boolean z) {
|
|
super(str);
|
|
this.motionType = CtrlMotionType.servo;
|
|
this.directionDisclock = false;
|
|
this.servoID = i;
|
|
this.motionType = ctrlMotionType;
|
|
this.directionDisclock = z;
|
|
}
|
|
}
|