Java Assert assertObjectEmpty(Object value)

Here you can find the source of assertObjectEmpty(Object value)

Description

assert Object Empty

License

Apache License

Declaration

public static boolean assertObjectEmpty(Object value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean assertObjectEmpty(Object value) {
        return value != null;
    }//from   ww w  . j av  a 2 s  .c  o m

    public static boolean assertObjectEmpty(String value) {
        return value != null && value.isEmpty();
    }

    public static boolean assertObjectEmpty(int value) {
        return value != 0;
    }

    public static boolean assertObjectEmpty(Integer value) {
        return value != null && value != 0;
    }

    public static boolean assertObjectEmpty(long value) {
        return value != 0;
    }

    public static boolean assertObjectEmpty(Long value) {
        return value != null && value != 0;
    }

    public static boolean assertObjectEmpty(short value) {
        return value != 0;
    }

    public static boolean assertObjectEmpty(Short value) {
        return value != null && value != 0;
    }

    public static boolean assertObjectEmpty(double value) {
        return value != 0;
    }

    public static boolean assertObjectEmpty(Double value) {
        return value != null && value != 0;
    }
}

Related

  1. assertNotEmptyString(final String s)
  2. assertNotEquals(final Object actual, final Object expected, final String name)
  3. assertNotMatches(String name, String regExp, String actual)
  4. assertNotTrue(boolean conditionThatMustNotBeTrue, String msgWhenTrue)
  5. assertNotTrue(boolean value, String message)
  6. assertObjEquals(Object expected, Object actual)
  7. assertOffsetLengthValid(int offset, int length, int arrayLength)
  8. assertOid(final String s)
  9. assertOneBitMask(long mask)