List of usage examples for java.lang Long equals
public boolean equals(Object obj)
From source file:Main.java
public static void main(String[] args) { Long long1 = new Long(12345L); Long long2 = new Long("12346"); System.out.println(long1.equals(long2)); }
From source file:Main.java
public static boolean isDefaultBible(Long bookType) { return bookType.equals(defaultBibleType); }
From source file:Main.java
public static Boolean isNotNull(Long lng) { if (lng == null || lng.equals("") || lng.equals(" ")) { return false; } else//w w w.j ava 2s . c o m return true; }
From source file:Main.java
public static boolean longsEqual(@Nullable Long one, @Nullable Long another) { return !(one != null ? !one.equals(another) : another != null); }
From source file:alpha.portal.webapp.util.Functions.java
/** * Checks if is user contributor.// w ww .j av a 2 s. c o m * * @param userId * the user id * @param card * the card * @return true, if is user contributor */ public static boolean isUserContributor(final Long userId, final AlphaCard card) { if ((card != null) && (card.getAlphaCardDescriptor() != null)) { final Long contributor = card.getAlphaCardDescriptor().getContributor(); if (contributor != null) return contributor.equals(userId); } return false; }
From source file:de.mg.stock.server.model.Stock.java
private static boolean samePrices(Long l1, Long l2) { if (l1 == null) return l2 == null; return l1.equals(l2); }
From source file:no.abmu.test.util.randomgenerator.RandomGeneratorUtil.java
public static Long createRandomADifferentLong(Long oldValue) { Assert.checkRequiredArgument("oldValue", oldValue); Long newRandomValue = createRandomLong(); // Just to be sure new value are different from old value. while (oldValue.equals(newRandomValue)) { String warningMessage = "[createRandomADifferentLong] new and old long has same value ='" + oldValue + "'."; System.out.println(warningMessage); logger.warn(warningMessage);/*from ww w. jav a 2s . c o m*/ newRandomValue = createRandomLong(); } return newRandomValue; }
From source file:com.yuga.ygplatform.modules.sys.entity.User.java
@Transient public static boolean isAdmin(Long id) { return (id != null) && id.equals(1L); }
From source file:com.aistor.modules.sys.entity.Role.java
@Transient public static boolean isAdmin(Long id) { return id != null && id.equals(1L); }
From source file:com.mobileman.projecth.web.util.UserUtils.java
/** * @param diseaseId/*w ww .j ava 2 s . c o m*/ * @param diseases * @return boolean */ public static boolean containsDisease(Long diseaseId, List<Disease> diseases) { for (Disease disease : diseases) { if (diseaseId.equals(disease.getId())) { return true; } } return false; }