本文整理了Java中com.eclipsesource.json.JsonObject.indexOf()
方法的一些代码示例,展示了JsonObject.indexOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonObject.indexOf()
方法的具体详情如下:
包路径:com.eclipsesource.json.JsonObject
类名称:JsonObject
方法名:indexOf
暂无
代码示例来源:origin: ralfstx/minimal-json
/**
* Returns the value of the member with the specified name in this object. If this object contains
* multiple members with the given name, this method will return the last one.
*
* @param name
* the name of the member whose value is to be returned
* @return the value of the last member with the specified name, or <code>null</code> if this
* object does not contain a member with that name
*/
public JsonValue get(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
return index != -1 ? values.get(index) : null;
}
代码示例来源:origin: ralfstx/minimal-json
/**
* Removes a member with the specified name from this object. If this object contains multiple
* members with the given name, only the last one is removed. If this object does not contain a
* member with the specified name, the object is not modified.
*
* @param name
* the name of the member to remove
* @return the object itself, to enable method chaining
*/
public JsonObject remove(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
if (index != -1) {
table.remove(index);
names.remove(index);
values.remove(index);
}
return this;
}
代码示例来源:origin: ralfstx/minimal-json
throw new NullPointerException("value is null");
int index = indexOf(name);
if (index != -1) {
values.set(index, value);
代码示例来源:origin: com.eclipsesource.minimal-json/minimal-json
/**
* Returns the value of the member with the specified name in this object. If this object contains
* multiple members with the given name, this method will return the last one.
*
* @param name
* the name of the member whose value is to be returned
* @return the value of the last member with the specified name, or <code>null</code> if this
* object does not contain a member with that name
*/
public JsonValue get(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
return index != -1 ? values.get(index) : null;
}
代码示例来源:origin: kiegroup/droolsjbpm-tools
/**
* Returns the value of the member with the specified name in this object. If this object contains
* multiple members with the given name, this method will return the last one.
*
* @param name
* the name of the member whose value is to be returned
* @return the value of the last member with the specified name, or <code>null</code> if this
* object does not contain a member with that name
*/
public JsonValue get( String name ) {
if( name == null ) {
throw new NullPointerException( "name is null" );
}
int index = indexOf( name );
return index != -1 ? values.get( index ) : null;
}
代码示例来源:origin: ZencashOfficial/zencash-swing-wallet-ui
/**
* Returns the value of the member with the specified name in this object. If this object contains
* multiple members with the given name, this method will return the last one.
*
* @param name
* the name of the member whose value is to be returned
* @return the value of the last member with the specified name, or <code>null</code> if this
* object does not contain a member with that name
*/
public JsonValue get(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
return index != -1 ? values.get(index) : null;
}
代码示例来源:origin: com.eclipsesource.minimal-json/minimal-json
/**
* Removes a member with the specified name from this object. If this object contains multiple
* members with the given name, only the last one is removed. If this object does not contain a
* member with the specified name, the object is not modified.
*
* @param name
* the name of the member to remove
* @return the object itself, to enable method chaining
*/
public JsonObject remove(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
if (index != -1) {
table.remove(index);
names.remove(index);
values.remove(index);
}
return this;
}
代码示例来源:origin: ZencashOfficial/zencash-swing-wallet-ui
/**
* Removes a member with the specified name from this object. If this object contains multiple
* members with the given name, only the last one is removed. If this object does not contain a
* member with the specified name, the object is not modified.
*
* @param name
* the name of the member to remove
* @return the object itself, to enable method chaining
*/
public JsonObject remove(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
int index = indexOf(name);
if (index != -1) {
table.remove(index);
names.remove(index);
values.remove(index);
}
return this;
}
代码示例来源:origin: kiegroup/droolsjbpm-tools
/**
* Removes a member with the specified name from this object. If this object contains multiple
* members with the given name, only the last one is removed. If this object does not contain a
* member with the specified name, the object is not modified.
*
* @param name
* the name of the member to remove
* @return the object itself, to enable method chaining
*/
public JsonObject remove( String name ) {
if( name == null ) {
throw new NullPointerException( "name is null" );
}
int index = indexOf( name );
if( index != -1 ) {
table.remove( index );
names.remove( index );
values.remove( index );
}
return this;
}
代码示例来源:origin: com.eclipsesource.minimal-json/minimal-json
throw new NullPointerException("value is null");
int index = indexOf(name);
if (index != -1) {
values.set(index, value);
代码示例来源:origin: ZencashOfficial/zencash-swing-wallet-ui
throw new NullPointerException("value is null");
int index = indexOf(name);
if (index != -1) {
values.set(index, value);
代码示例来源:origin: kiegroup/droolsjbpm-tools
throw new NullPointerException( "value is null" );
int index = indexOf( name );
if( index != -1 ) {
values.set( index, value );
内容来源于网络,如有侵权,请联系作者删除!