Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.aop.array;
 /*    */ 
 /*    */ public class ByteBooleanConverter
 /*    */ {
 /*    */   private static final byte BOOLEAN_FALSE = 0;
 /*    */   private static final byte BOOLEAN_TRUE = 1;
 /*    */ 
 /*    */   public static byte toByte(boolean b)
 /*    */   {
/* 36 */     return b ? 1 : 0;
/*    */   }
/*    */ 
/*    */   public static boolean toBoolean(byte b)
/*    */   {
/* 41 */     if (b == 0) return false;
/* 42 */     if (b == 1) return true;
/*    */ 
/* 44 */     throw new RuntimeException("Invalid byte " + b + " cannot be converted to a boolean");
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.aop.array.ByteBooleanConverter
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X