109 lines
3.1 KiB
Java
109 lines
3.1 KiB
Java
|
package com.airbnb.deeplinkdispatch;
|
||
|
|
||
|
import com.airbnb.deeplinkdispatch.base.Utils;
|
||
|
import o.C14953gcr;
|
||
|
import o.C14957gcv;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class NodeMetadata {
|
||
|
public static final Companion Companion = new Companion(null);
|
||
|
private static final byte zero = 0;
|
||
|
public final boolean isComponentParam;
|
||
|
public final boolean isConfigurablePathSegment;
|
||
|
public final boolean isValueLiteralValue;
|
||
|
private byte metadata;
|
||
|
|
||
|
public NodeMetadata(byte b) {
|
||
|
this.metadata = b;
|
||
|
boolean z = ((byte) (b & 16)) != 0;
|
||
|
this.isComponentParam = z;
|
||
|
boolean z2 = ((byte) (b & 32)) != 0;
|
||
|
this.isConfigurablePathSegment = z2;
|
||
|
this.isValueLiteralValue = (z || z2) ? false : true;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
||
|
public NodeMetadata(byte b, String str) {
|
||
|
this((byte) (b | Companion.transformationType(str)));
|
||
|
C14957gcv.e(str, "");
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class Companion {
|
||
|
public final boolean isComponentParam(byte b) {
|
||
|
return ((byte) (b & 16)) != 0;
|
||
|
}
|
||
|
|
||
|
public final boolean isComponentTypeHost(byte b) {
|
||
|
return ((byte) (b & 4)) != 0;
|
||
|
}
|
||
|
|
||
|
public final boolean isComponentTypePathSegment(byte b) {
|
||
|
return ((byte) (b & 8)) != 0;
|
||
|
}
|
||
|
|
||
|
public final boolean isComponentTypeRoot(byte b) {
|
||
|
return ((byte) (b & 1)) != 0;
|
||
|
}
|
||
|
|
||
|
public final boolean isComponentTypeScheme(byte b) {
|
||
|
return ((byte) (b & 2)) != 0;
|
||
|
}
|
||
|
|
||
|
public final boolean isConfigurablePathSegment(byte b) {
|
||
|
return ((byte) (b & 32)) != 0;
|
||
|
}
|
||
|
|
||
|
private Companion() {
|
||
|
}
|
||
|
|
||
|
public final byte transformationType(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
if (Utils.INSTANCE.validateIfConfigurablePathSegment(str)) {
|
||
|
return (byte) 32;
|
||
|
}
|
||
|
return Utils.INSTANCE.validateIfComponentParam(str) ? (byte) 16 : (byte) 0;
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ Companion(C14953gcr c14953gcr) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setMetadata(byte b) {
|
||
|
this.metadata = b;
|
||
|
}
|
||
|
|
||
|
public final boolean isComponentTypeMismatch(byte b) {
|
||
|
return ((byte) (b & this.metadata)) == 0;
|
||
|
}
|
||
|
|
||
|
public final byte getMetadata() {
|
||
|
return this.metadata;
|
||
|
}
|
||
|
|
||
|
public static final boolean isConfigurablePathSegment(byte b) {
|
||
|
return Companion.isConfigurablePathSegment(b);
|
||
|
}
|
||
|
|
||
|
public static final boolean isComponentTypeScheme(byte b) {
|
||
|
return Companion.isComponentTypeScheme(b);
|
||
|
}
|
||
|
|
||
|
public static final boolean isComponentTypeRoot(byte b) {
|
||
|
return Companion.isComponentTypeRoot(b);
|
||
|
}
|
||
|
|
||
|
public static final boolean isComponentTypePathSegment(byte b) {
|
||
|
return Companion.isComponentTypePathSegment(b);
|
||
|
}
|
||
|
|
||
|
public static final boolean isComponentTypeHost(byte b) {
|
||
|
return Companion.isComponentTypeHost(b);
|
||
|
}
|
||
|
|
||
|
public static final boolean isComponentParam(byte b) {
|
||
|
return Companion.isComponentParam(b);
|
||
|
}
|
||
|
}
|