List of usage examples for java.lang Long MAX_VALUE
long MAX_VALUE
To view the source code for java.lang Long MAX_VALUE.
Click Source Link
From source file:edu.infsci2560.models.Book.java
public Book() { this.id = Long.MAX_VALUE; this.title = null; this.bookType = BookType.Unknown; this.bookPrice = 0; }
From source file:edu.infsci2560.models.Player.java
public Player() { this.id = Long.MAX_VALUE; this.name = null; this.team = null; this.playerLevel = PlayerLevel.Other; }
From source file:com.clustercontrol.hub.util.StringDataIdGenerator.java
public static Long getMax() { return Long.MAX_VALUE; }
From source file:Main.java
/** * Returns n!. Shorthand for <code>n</code> <a * href="http://mathworld.wolfram.com/Factorial.html"> Factorial</a>, the * product of the numbers <code>1,...,n</code>. * <p>//from w w w .ja va 2 s . c om * <Strong>Preconditions</strong>: * <ul> * <li> <code>n >= 0</code> (otherwise * <code>IllegalArgumentException</code> is thrown)</li> * <li> The result is small enough to fit into a <code>long</code>. The * largest value of <code>n</code> for which <code>n!</code> < * Long.MAX_VALUE</code> is 20. If the computed value exceeds <code>Long.MAX_VALUE</code> * an <code>ArithMeticException </code> is thrown.</li> * </ul> * </p> * * @param n argument * @return <code>n!</code> * @throws ArithmeticException if the result is too large to be represented * by a long integer. * @throws IllegalArgumentException if n < 0 */ public static long factorial(final int n) { long result = Math.round(factorialDouble(n)); if (result == Long.MAX_VALUE) { throw new ArithmeticException("result too large to represent in a long integer"); } return result; }
From source file:com.livhuwani.rambuda.policyquotationapp.services.Impl.BusinessInterestCrudServiceImpl.java
@Override public BusinessInterest createBusinessInterest() { BusinessInterest newBusinessInterest = new BusinessInterest(); newBusinessInterest.setId(Long.MAX_VALUE + 1); newBusinessInterest.setBusniessType("Private Company"); newBusinessInterest.setRegisteredName("MD Corperations SA"); BusinessInterest savedBusiness = businessInterestRepository.save(newBusinessInterest); return savedBusiness; }
From source file:com.livhuwani.rambuda.policyquotation_app.service.Impl.BusinessInterestCrudServiceImpl.java
@Override public BusinessInterest createBusinessInterest() { BusinessInterest newBusinessInterest = new BusinessInterest(); newBusinessInterest.setId(Long.MAX_VALUE + 1); newBusinessInterest.setBusniessType("Private Company"); newBusinessInterest.setRegisteredName("MD Corperations SA"); BusinessInterest savedBusiness = businessInterestRepository.saveAndFlush(newBusinessInterest); return savedBusiness; }
From source file:edu.infsci2560.models.Car.java
public Car() { this.id = Long.MAX_VALUE; this.title = null; this.carType = CarType.Other; this.price = null; this.description = null; }
From source file:com.twitter.hraven.FlowKey.java
/** * Encodes the given timestamp for ordering by run ID *//*w w w. j av a2s . c o m*/ public static long encodeRunId(long timestamp) { return Long.MAX_VALUE - timestamp; }
From source file:com.livhuwani.rambuda.policyquotationapp.services.Impl.ChildMaintenanceCrudServiceImpl.java
@Override public ChildMaintenance createChildMaintenance() { ChildMaintenance newChildMaintenance = new ChildMaintenance(); newChildMaintenance.setId(Long.MAX_VALUE + 1); newChildMaintenance.setAnnualIncreasePercentage(50); newChildMaintenance.setCashValue(BigDecimal.valueOf(2500)); newChildMaintenance.setTerm(60);/*from ww w .j a va2s. c o m*/ ChildMaintenance savedChildMaintenance = childMaintenanceRepository.save(newChildMaintenance); return savedChildMaintenance; }
From source file:com.livhuwani.rambuda.policyquotation_app.service.Impl.ChildMaintenanceCrudServiceImpl.java
@Override public ChildMaintenance createChildMaintenance() { ChildMaintenance newChildMaintenance = new ChildMaintenance(); newChildMaintenance.setId(Long.MAX_VALUE + 1); newChildMaintenance.setAnnualIncreasePercentage(50); newChildMaintenance.setCashValue(BigDecimal.valueOf(2500)); newChildMaintenance.setTerm(60);/*from ww w . j a va2 s.c om*/ ChildMaintenance savedChildMaintenance = childMaintenanceRepository.saveAndFlush(newChildMaintenance); return savedChildMaintenance; }