Package lombok

Examples of lombok.val.cast()


  private static <TSource, TDest> void castThrow(TSource[] values, ReifiedList<TDest> list)
  {
    val destinationClass = list.getGenericTypeParameter();
    for (TSource v : values)
    {
      TDest castVal = (TDest) destinationClass.cast(v);
      list.add(castVal);
    }
  }

  /**
 
View Full Code Here


    for (TSource v : values)
    {
      TDest castVal;
      try
      {
        castVal = (TDest) destinationClass.cast(v);
      }
      catch(ClassCastException e)
      {
        // remove upon any failure
        continue;
View Full Code Here

  private static <TSource, TDest> void castThrow(TSource[] values, ReifiedList<TDest> list)
  {
    val destinationClass = list.getGenericTypeParameter();
    for (TSource v : values)
    {
      TDest castVal = (TDest) destinationClass.cast(v);
      list.add(castVal);
    }
  }

  /**
 
View Full Code Here

    for (TSource v : values)
    {
      TDest castVal;
      try
      {
        castVal = (TDest) destinationClass.cast(v);
      }
      catch(ClassCastException e)
      {
        // remove upon any failure
        continue;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.