public class BuilderLimits
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
BuilderLimits()
Create a new
BuilderLimits class with large, but bounded, limits
on object building. |
Modifier and Type | Method and Description |
---|---|
BuilderLimits |
clone()
Clone this
BuilderLimits object for customisation, or to avoid
mutation from outside code. |
boolean |
equals(java.lang.Object o) |
int |
getContentNodes()
Total number of child nodes per object or array.
|
int |
getExponentDigits()
The maximum number of exponent digits in a number.
|
LimitFilter |
getFilter()
Soft filtering for any object, array, or value that passes the other
limits provided.
|
int |
getKeyLength()
The maximum length of any key.
|
int |
getMantissaDigits()
The maximum number of mantissa digits in a number.
|
int |
getNestingDepth()
Total nesting depth of objects or arrays.
|
int |
getStringLength()
The maximum length of any string value.
|
int |
hashCode() |
static BuilderLimits |
secureDefaults()
Return a
BuilderLimits object that contains some limits for
secure processing. |
void |
setContentNodes(int contentNodes)
Total number of child nodes per object or array.
|
void |
setExponentDigits(int exponentDigits)
The maximum number of exponent digits in a number.
|
void |
setFilter(LimitFilter filter)
Soft filtering for any object, array, or value that passes the other
limits provided.
|
void |
setKeyLength(int keyLength)
The maximum length of any key.
|
void |
setMantissaDigits(int mantissaDigits)
The maximum number of mantissa digits in a number.
|
void |
setNestingDepth(int nestingDepth)
Total nesting depth of objects or arrays.
|
void |
setStringLength(int stringLength)
The maximum length of any string value.
|
java.lang.String |
toString() |
public BuilderLimits()
BuilderLimits
class with large, but bounded, limits
on object building.public void setKeyLength(int keyLength)
keyLength
- the maximum length of any keypublic void setStringLength(int stringLength)
stringLength
- the maximum length of any string valuepublic void setMantissaDigits(int mantissaDigits)
mantissaDigits
- the maximum number of mantissa digits of any
number valuepublic void setExponentDigits(int exponentDigits)
exponentDigits
- the maximum number of exponent digits of any
number valuepublic void setContentNodes(int contentNodes)
contentNodes
- the total number of values, arrays, and objects for
any given container array or objectpublic void setNestingDepth(int nestingDepth)
nestingDepth
- the maximum nesting depth within any array or objectpublic int getKeyLength()
public int getStringLength()
public int getMantissaDigits()
public int getExponentDigits()
public int getContentNodes()
public int getNestingDepth()
public LimitFilter getFilter()
public void setFilter(LimitFilter filter)
filter
- the filter for creating objects, arrays, or valuespublic static BuilderLimits secureDefaults()
BuilderLimits
object that contains some limits for
secure processing. These can be customised as needed.
The limits specify:
Long
and Double
values. These conform to the I-JSON requirements (RFC 7493)String
objectBuilderLimits
object with secure processing limitspublic BuilderLimits clone()
BuilderLimits
object for customisation, or to avoid
mutation from outside code.clone
in class java.lang.Object
BuilderLimits
objectpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object