Java Integer Clip clipSigned(int v)

Here you can find the source of clipSigned(int v)

Description

clip Signed

License

BSD License

Declaration

private static int clipSigned(int v) 

Method Source Code

//package com.java2s;
/**/*  w ww  .  jav a  2  s  .  c  o  m*/
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * @author The JCodec project
 * 
 */

public class Main {
    private static int clipSigned(int v) {
        return (int) (v < -128 ? -128 : (v > 127 ? 127 : v));
    }
}

Related

  1. clipInt(int value, int max)
  2. clipInt(int value, int min, int max)
  3. clipPeerIdFromCurrentThreadName()
  4. clipPlus128(int v)
  5. clipRange(int value, int lowLimit, int highLimit)