-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Boolean and Character tests to everything test. Added missing M…
…ap tests. Added new stats/info to Everything test output.
- Loading branch information
Showing
10 changed files
with
305 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,15 @@ | |
import java.math.BigDecimal; | ||
import java.math.BigInteger; | ||
import java.time.Year; | ||
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicBoolean; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
|
||
import static com.cedarsoftware.util.convert.MapConversions.YEAR; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
* <br> | ||
|
@@ -54,11 +59,7 @@ static double toDouble(Object from, Converter converter) { | |
static float toFloat(Object from, Converter converter) { | ||
return toInt(from, converter); | ||
} | ||
|
||
static boolean toBoolean(Object from, Converter converter) { | ||
return toInt(from, converter) == 0; | ||
} | ||
|
||
|
||
static AtomicBoolean toAtomicBoolean(Object from, Converter converter) { | ||
return new AtomicBoolean(toInt(from, converter) == 0); | ||
} | ||
|
@@ -74,4 +75,11 @@ static BigDecimal toBigDecimal(Object from, Converter converter) { | |
static String toString(Object from, Converter converter) { | ||
return ((Year)from).toString(); | ||
} | ||
|
||
static Map<?, ?> toMap(Object from, Converter converter) { | ||
Year year = (Year) from; | ||
Map<String, Integer> map = new CompactLinkedMap<>(); | ||
map.put(YEAR, year.getValue()); | ||
return map; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.