This commit is contained in:
26
src/com/wentch/redkale/util/ObjectNode.java
Normal file
26
src/com/wentch/redkale/util/ObjectNode.java
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.wentch.redkale.util;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author zhangjx
|
||||||
|
*/
|
||||||
|
public class ObjectNode extends HashMap<String, Object> {
|
||||||
|
|
||||||
|
public static ObjectNode create(String key, Object value) {
|
||||||
|
ObjectNode node = new ObjectNode();
|
||||||
|
node.put(key, value);
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectNode and(String key, Object value) {
|
||||||
|
this.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user