enjoy 3.4

This commit is contained in:
James
2018-04-01 16:29:13 +08:00
parent 2ed806c296
commit ef7b0da917
16 changed files with 215 additions and 109 deletions

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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);
}
}