-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed references to CompactLinkedMapp
- Loading branch information
Showing
29 changed files
with
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -122,7 +122,7 @@ static OffsetDateTime toOffsetDateTime(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
Calendar cal = (Calendar) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.DATE, LocalDate.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH)).toString()); | ||
target.put(MapConversions.TIME, LocalTime.of(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), cal.get(Calendar.MILLISECOND) * 1_000_000).toString()); | ||
target.put(MapConversions.ZONE, cal.getTimeZone().toZoneId().toString()); | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -149,7 +149,7 @@ static String toString(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
Date date = (Date) from; | ||
Map<String, Object> map = new CompactLinkedMap<>(); | ||
Map<String, Object> map = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
ZonedDateTime zdt = toZonedDateTime(date, converter); | ||
map.put(MapConversions.DATE, zdt.toLocalDate().toString()); | ||
map.put(MapConversions.TIME, zdt.toLocalTime().toString()); | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -34,7 +34,7 @@ private DurationConversions() {} | |
static Map toMap(Object from, Converter converter) { | ||
long sec = ((Duration) from).getSeconds(); | ||
int nanos = ((Duration) from).getNano(); | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put("seconds", sec); | ||
target.put("nanos", nanos); | ||
return target; | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
import java.util.EnumSet; | ||
import java.util.Map; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -30,7 +30,7 @@ private EnumConversions() {} | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
Enum<?> enumInstance = (Enum<?>) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put("name", enumInstance.name()); | ||
return target; | ||
} | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
import java.util.TimeZone; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -42,7 +42,7 @@ private InstantConversions() {} | |
static Map toMap(Object from, Converter converter) { | ||
long sec = ((Instant) from).getEpochSecond(); | ||
int nanos = ((Instant) from).getNano(); | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put("seconds", sec); | ||
target.put("nanos", nanos); | ||
return target; | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
import java.util.TimeZone; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -109,7 +109,7 @@ static String toString(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
LocalDate localDate = (LocalDate) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.DATE, localDate.toString()); | ||
return target; | ||
} | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -116,7 +116,7 @@ static String toString(Object from, Converter converter) { | |
|
||
static Map<?, ?> toMap(Object from, Converter converter) { | ||
LocalDateTime localDateTime = (LocalDateTime) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.DATE, localDateTime.toLocalDate().toString()); | ||
target.put(MapConversions.TIME, localDateTime.toLocalTime().toString()); | ||
return target; | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
import java.util.concurrent.atomic.AtomicInteger; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -36,7 +36,7 @@ private LocalTimeConversions() {} | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
LocalTime localTime = (LocalTime) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.TIME, localTime.toString()); | ||
return target; | ||
} | ||
|
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,7 +3,7 @@ | |
import java.time.MonthDay; | ||
import java.util.Map; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -28,7 +28,7 @@ private MonthDayConversions() {} | |
|
||
static Map toMap(Object from, Converter converter) { | ||
MonthDay monthDay = (MonthDay) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put("day", monthDay.getDayOfMonth()); | ||
target.put("month", monthDay.getMonthValue()); | ||
return target; | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author Kenny Partlow ([email protected]) | ||
|
@@ -110,7 +110,7 @@ static String toString(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
ZonedDateTime zdt = toZonedDateTime(from, converter); | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.DATE, zdt.toLocalDate().toString()); | ||
target.put(MapConversions.TIME, zdt.toLocalTime().toString()); | ||
target.put(MapConversions.OFFSET, zdt.getOffset().toString()); | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
import java.time.format.DateTimeFormatter; | ||
import java.util.Map; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -33,7 +33,7 @@ static String toString(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
OffsetTime offsetTime = (OffsetTime) from; | ||
Map<String, Object> map = new CompactLinkedMap<>(); | ||
Map<String, Object> map = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
map.put(MapConversions.TIME, offsetTime.toString()); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
import java.time.Period; | ||
import java.util.Map; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -28,7 +28,7 @@ private PeriodConversions() {} | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
Period period = (Period) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.YEARS, period.getYears()); | ||
target.put(MapConversions.MONTHS, period.getMonths()); | ||
target.put(MapConversions.DAYS, period.getDays()); | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
import java.util.Date; | ||
import java.util.Map; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -76,7 +76,7 @@ static Calendar toCalendar(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
Date date = (Date) from; | ||
Map<String, Object> map = new CompactLinkedMap<>(); | ||
Map<String, Object> map = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
OffsetDateTime odt = toOffsetDateTime(date, converter); | ||
map.put(MapConversions.DATE, odt.toLocalDate().toString()); | ||
map.put(MapConversions.TIME, odt.toLocalTime().toString()); | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
import java.util.Map; | ||
import java.util.UUID; | ||
|
||
import com.cedarsoftware.util.CompactLinkedMap; | ||
import com.cedarsoftware.util.CompactMap; | ||
|
||
/** | ||
* @author John DeRegnaucourt ([email protected]) | ||
|
@@ -40,7 +40,7 @@ static BigInteger toBigInteger(Object from, Converter converter) { | |
|
||
static Map<String, Object> toMap(Object from, Converter converter) { | ||
UUID uuid = (UUID) from; | ||
Map<String, Object> target = new CompactLinkedMap<>(); | ||
Map<String, Object> target = CompactMap.<String, Object>builder().insertionOrder().build(); | ||
target.put(MapConversions.UUID, uuid.toString()); | ||
return target; | ||
} | ||
|
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
Oops, something went wrong.