forked from fanruan/demo-tabledata-redis
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
855 B
40 lines
855 B
package com.fr.plugin.db.redis.core.order.impl; |
|
|
|
import com.fr.base.Parameter; |
|
import com.fr.plugin.db.redis.core.order.OrderValue; |
|
import com.fr.script.Calculator; |
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
public class NumberOrderValue extends OrderValue { |
|
|
|
private static final long serialVersionUID = -7086244583348467452L; |
|
private int value; |
|
|
|
public NumberOrderValue() { |
|
|
|
} |
|
|
|
public NumberOrderValue(int value) { |
|
this.value = value; |
|
} |
|
|
|
@Override |
|
public Integer getValue() { |
|
return value; |
|
} |
|
|
|
@Override |
|
public int toIndex(Calculator cal, Parameter[] ps) { |
|
return getValue(); |
|
} |
|
|
|
@Override |
|
public void readValue(XMLableReader reader) { |
|
this.value = reader.getAttrAsInt("value", 0); |
|
} |
|
|
|
@Override |
|
public String toString() { |
|
return value + ""; |
|
} |
|
}
|
|
|