Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Threema/app/src/main/java/ch/threema/app/utils/     Datei vom 25.3.2026 mit Größe 1 kB image not shown  

Quelle  TestUtil.java

  Sprache: JAVA
 

package ch.threema.app.utils;

import java.util.Arrays;

import androidx.annotation.Nullable;

import static ch.threema.common.ReflectionExtensionsKt.isClassAvailable;

public class TestUtil {
    public static boolean compare(Object a, Object b) {
        if (a == null) {
            return b == null;
        }

        if (b == null) {
            return false;
        }

        if (a instanceof byte[] && b instanceof byte[]) {
            return Arrays.equals((byte[]) a, (byte[]) b);
        }

        return a.equals(b);
    }

    /**
     * Returns true if the provided string is null or empty.
     */

    public static boolean isEmptyOrNull(@Nullable String string) {
        return string == null || string.isEmpty();
    }

    /**
     * Returns true if the provided string is null, empty or blank.
     */

    public static boolean isBlankOrNull(@Nullable String string) {
        return string == null || string.isBlank();
    }

    /**
     * Returns true if the char sequence is null, empty or blank.
     */

    public static boolean isBlankOrNull(@Nullable CharSequence charSequence) {
        if (charSequence == null) {
            return true;
        }
        String string = charSequence.toString();
        return isBlankOrNull(string);
    }

    public static boolean isInDeviceTest() {
        return isClassAvailable("ch.threema.app.ThreemaTestRunner");
    }
}

Messung V0.5 in Prozent
C=95 H=96 G=95

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.