Skip to content

Instantly share code, notes, and snippets.

View Dragorn421's full-sized avatar

Dragorn421 Dragorn421

  • France
  • 07:44 (UTC +02:00)
View GitHub Profile
@SuppressWarnings("unchecked")
public static <T extends JsonElement> T merge(final T obj1, final T obj2)
{
if(obj1 == null)
return clone(obj2);
if(obj2 == null)
return clone(obj1);
if(obj1 instanceof JsonObject)
{
final Map<String, JsonElement> merged = new HashMap<>();
<!DOCTYPE html>
<html><head>
<title>PositionTest</title>
<script type="text/javascript" src="js.js"></script>
<style>
table, tbody, tr, th, td {
border: 1px solid black;
border-collapse: collapse;
}