Example usage for java.lang Long MAX_VALUE

List of usage examples for java.lang Long MAX_VALUE

Introduction

In this page you can find the example usage for java.lang Long MAX_VALUE.

Prototype

long MAX_VALUE

To view the source code for java.lang Long MAX_VALUE.

Click Source Link

Document

A constant holding the maximum value a long can have, 263-1.

Usage

From source file:edu.infsci2560.models.publicFoods.java

public publicFoods() {
    this.publicid = Long.MAX_VALUE;
    this.title = null;
    this.cookingStyle = CookingStyle.Others;
    this.ifpublic = 0;
}

From source file:edu.infsci2560.models.Game.java

public Game() {
    this.id = Long.MAX_VALUE;
    this.home = null;
    this.away = null;
    this.season = Long.MAX_VALUE;
    this.comment = null;
}

From source file:edu.infsci2560.models.Movie.java

public Movie() {
    this.id = Long.MAX_VALUE;
    this.title = null;
    this.videoType = VideoType.Other;
}

From source file:edu.infsci2560.models.Dvd.java

public Dvd() {
    this.id = Long.MAX_VALUE;
    this.title = null;
    this.workoutType = WorkoutType.Unknown;
}

From source file:edu.infsci2560.models.Comment.java

public Comment() {
    this.id = Long.MAX_VALUE;
    this.post = null;
    this.commentType = CommentType.Other;
}

From source file:com.livhuwani.rambuda.policyquotationapp.services.Impl.InvestmentCrudServiceImpl.java

@Override
public Investment createInvestment() {
    Investment newInvestment = new Investment();
    newInvestment.setId(Long.MAX_VALUE + 1);
    newInvestment.setInstitutionName("JSE");
    newInvestment.setInvestmentType("Shares Investment");
    newInvestment.setNumber("2");

    Investment savedInvestment = investmentRepository.save(newInvestment);
    return savedInvestment;
}

From source file:com.livhuwani.rambuda.policyquotation_app.service.Impl.InvestmentCrudServiceImpl.java

@Override
public Investment createInvestment() {
    Investment newInvestment = new Investment();
    newInvestment.setId(Long.MAX_VALUE + 1);
    newInvestment.setInstitutionName("JSE");
    newInvestment.setInvestmentType("Shares Investment");
    newInvestment.setNumber("2");

    Investment savedInvestment = investmentRepository.saveAndFlush(newInvestment);
    return savedInvestment;
}

From source file:com.offbynull.portmapper.common.ProcessUtils.java

/**
 * Run a process and dump the stdout stream to a string.
 * @param timeout maximum amount of time the process can take to run
 * @param command command/*from   ww w  .j  av  a2 s. c o  m*/
 * @param args arguments
 * @return stdout from the process dumped to a string
 * @throws IOException if the process encounters an error
 * @throws NullPointerException if any arguments are {@code null} or contains {@code null}
 * @throws IllegalArgumentException any numeric argument is negative
 */
public static String runProcessAndDumpOutput(long timeout, String command, String... args) throws IOException {
    Validate.notNull(command);
    Validate.noNullElements(args);
    Validate.inclusiveBetween(0L, Long.MAX_VALUE, timeout);

    String[] pbCmd = new String[args.length + 1];
    pbCmd[0] = command;
    System.arraycopy(args, 0, pbCmd, 1, args.length);

    ProcessBuilder builder = new ProcessBuilder(pbCmd);

    final AtomicBoolean failedFlag = new AtomicBoolean();

    Timer timer = new Timer("Process timeout timer", true);
    Process proc = null;
    try {
        proc = builder.start();

        final Process finalProc = proc;
        timer.schedule(new TimerTask() {

            @Override
            public void run() {
                failedFlag.set(true);
                finalProc.destroy();
            }
        }, timeout);

        String ret = IOUtils.toString(proc.getInputStream());
        if (failedFlag.get()) {
            throw new IOException("Process failed");
        }

        return ret;
    } finally {
        if (proc != null) {
            proc.destroy();
        }
        timer.cancel();
        timer.purge();
    }
}

From source file:edu.infsci2560.models.Event.java

public Event() {
    this.id = Long.MAX_VALUE;
    this.eventTitle = null;
    this.eventDate = null;
    this.eventContent = null;
    this.imageName = null;
}

From source file:edu.infsci2560.models.OldNba.java

public OldNba() {
    this.id = Long.MAX_VALUE;
    this.title = null;
    this.player = null;
    this.links = null;
}