Java Object Type Case cast(long value)

Here you can find the source of cast(long value)

Description

cast

License

Open Source License

Declaration


public static int cast(long value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static int cast(long value) {
        return value > Integer.MAX_VALUE ? Integer.MAX_VALUE
                : value < Integer.MIN_VALUE ? Integer.MIN_VALUE : (int) value;
    }/*from w ww  .java2 s .  c o m*/
}

Related

  1. cast(final Object obj, final Class type)
  2. cast(final Object object)
  3. cast(final Object original)
  4. cast(int value)
  5. cast(int value)
  6. cast(Object inValue)
  7. cast(Object o)
  8. cast(Object o, Class clazz)
  9. cast(Object o, Class klass)