mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-19 04:13:18 +01:00
70 lines
2.3 KiB
Java
70 lines
2.3 KiB
Java
package org.apache.http.config;
|
|
|
|
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
|
|
import defpackage.a$$ExternalSyntheticOutline0;
|
|
import org.apache.http.util.Args;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes11.dex */
|
|
public class MessageConstraints implements Cloneable {
|
|
public static final MessageConstraints DEFAULT = new Builder().build();
|
|
private final int maxHeaderCount;
|
|
private final int maxLineLength;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class Builder {
|
|
private int maxLineLength = -1;
|
|
private int maxHeaderCount = -1;
|
|
|
|
public MessageConstraints build() {
|
|
return new MessageConstraints(this.maxLineLength, this.maxHeaderCount);
|
|
}
|
|
|
|
public Builder setMaxHeaderCount(int i) {
|
|
this.maxHeaderCount = i;
|
|
return this;
|
|
}
|
|
|
|
public Builder setMaxLineLength(int i) {
|
|
this.maxLineLength = i;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public MessageConstraints(int i, int i2) {
|
|
this.maxLineLength = i;
|
|
this.maxHeaderCount = i2;
|
|
}
|
|
|
|
public static Builder copy(MessageConstraints messageConstraints) {
|
|
Args.notNull(messageConstraints, "Message constraints");
|
|
return new Builder().setMaxHeaderCount(messageConstraints.getMaxHeaderCount()).setMaxLineLength(messageConstraints.getMaxLineLength());
|
|
}
|
|
|
|
public static Builder custom() {
|
|
return new Builder();
|
|
}
|
|
|
|
public static MessageConstraints lineLen(int i) {
|
|
return new MessageConstraints(Args.notNegative(i, "Max line length"), -1);
|
|
}
|
|
|
|
public MessageConstraints clone() throws CloneNotSupportedException {
|
|
return (MessageConstraints) super.clone();
|
|
}
|
|
|
|
public int getMaxHeaderCount() {
|
|
return this.maxHeaderCount;
|
|
}
|
|
|
|
public int getMaxLineLength() {
|
|
return this.maxLineLength;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder("[maxLineLength=");
|
|
sb.append(this.maxLineLength);
|
|
sb.append(", maxHeaderCount=");
|
|
return a$$ExternalSyntheticOutline0.m(sb, this.maxHeaderCount, MarkdownConstants.RIGHT_BRACKET);
|
|
}
|
|
}
|