enjoy 3.4
This commit is contained in:
@@ -43,6 +43,14 @@ public class ByteExt {
|
||||
public Double toDouble(Byte self) {
|
||||
return self.doubleValue();
|
||||
}
|
||||
|
||||
public Short toShort(Byte self) {
|
||||
return self.shortValue();
|
||||
}
|
||||
|
||||
public Byte toByte(Byte self) {
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,6 +43,14 @@ public class DoubleExt {
|
||||
public Double toDouble(Double self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
public Short toShort(Double self) {
|
||||
return self.shortValue();
|
||||
}
|
||||
|
||||
public Byte toByte(Double self) {
|
||||
return self.byteValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,6 +43,14 @@ public class FloatExt {
|
||||
public Double toDouble(Float self) {
|
||||
return self.doubleValue();
|
||||
}
|
||||
|
||||
public Short toShort(Float self) {
|
||||
return self.shortValue();
|
||||
}
|
||||
|
||||
public Byte toByte(Float self) {
|
||||
return self.byteValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -63,6 +63,14 @@ public class IntegerExt {
|
||||
public Double toDouble(Integer self) {
|
||||
return self.doubleValue();
|
||||
}
|
||||
|
||||
public Short toShort(Integer self) {
|
||||
return self.shortValue();
|
||||
}
|
||||
|
||||
public Byte toByte(Integer self) {
|
||||
return self.byteValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,6 +43,14 @@ public class LongExt {
|
||||
public Double toDouble(Long self) {
|
||||
return self.doubleValue();
|
||||
}
|
||||
|
||||
public Short toShort(Long self) {
|
||||
return self.shortValue();
|
||||
}
|
||||
|
||||
public Byte toByte(Long self) {
|
||||
return self.byteValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,6 +43,14 @@ public class ShortExt {
|
||||
public Double toDouble(Short self) {
|
||||
return self.doubleValue();
|
||||
}
|
||||
|
||||
public Short toShort(Short self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
public Byte toByte(Short self) {
|
||||
return self.byteValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -79,6 +79,14 @@ public class StringExt {
|
||||
public Double toDouble(String self) {
|
||||
return StrKit.isBlank(self) ? null : Double.parseDouble(self);
|
||||
}
|
||||
|
||||
public Short toShort(String self) {
|
||||
return StrKit.isBlank(self) ? null : Short.parseShort(self);
|
||||
}
|
||||
|
||||
public Byte toByte(String self) {
|
||||
return StrKit.isBlank(self) ? null : Byte.parseByte(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user