Modifier and Type | Field and Description |
---|---|
static ReturnFields |
ALL |
static ReturnFields |
ALL_RECURSIVELY |
static ReturnFields |
NONE |
Constructor and Description |
---|
ReturnFields() |
ReturnFields(String spec) |
Modifier and Type | Method and Description |
---|---|
ReturnFields |
child(String field)
Get ReturnFields for a child field of JSONObject type.
|
boolean |
excluded(String field)
Check to see if the field specified is set to be explicitly excluded.
|
boolean |
included(String... pathSegments)
Check to see if the field should be included in JSON response.
|
boolean |
isAll() |
boolean |
isEmpty()
Determine if zero fields should be returned.
|
Iterator<String> |
iterator()
Iterate over child fields to be included in response.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static ReturnFields ALL
public static ReturnFields NONE
public static ReturnFields ALL_RECURSIVELY
public ReturnFields()
public ReturnFields(String spec)
public ReturnFields child(String field)
For basic-typed fields this always returns null. Use included() for those.
field
- The child field name for nested returns.public boolean included(String... pathSegments)
The check can be performed for any level of depth relative to current nesting level, by specifying multiple path segments.
pathSegments
- Segments to test in the tree of return fields.public boolean excluded(String field)
field
- The field name to checkpublic Iterator<String> iterator()
To get nested field specifier use child(name) passing the field name this iterator returns.
public boolean isEmpty()
true
if the list is empty, else, false
public boolean isAll()
Copyright © 2021 JBoss by Red Hat. All rights reserved.