Mercurial Hosting > luan
comparison src/luan/modules/BasicLuan.java @ 1164:1f9d34a6f308
remove assertions
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 17:36:38 -0700 |
parents | bfbd5401353a |
children | 7ef40e1923b7 |
comparison
equal
deleted
inserted
replaced
1163:fef8f0742da9 | 1164:1f9d34a6f308 |
---|---|
111 LuanTable tbl = new LuanException(s).table(); | 111 LuanTable tbl = new LuanException(s).table(); |
112 tbl.rawPut( "message", msg ); | 112 tbl.rawPut( "message", msg ); |
113 return tbl; | 113 return tbl; |
114 } | 114 } |
115 | 115 |
116 public static String assert_string(String v) throws LuanException { | |
117 Utils.checkNotNull(v); | |
118 return v; | |
119 } | |
120 | |
121 public static Number assert_number(Number v) throws LuanException { | |
122 Utils.checkNotNull(v); | |
123 return v; | |
124 } | |
125 | |
126 public static LuanTable assert_table(LuanTable v) throws LuanException { | |
127 Utils.checkNotNull(v); | |
128 return v; | |
129 } | |
130 | |
131 public static boolean assert_boolean(boolean v) throws LuanException { | |
132 return v; | |
133 } | |
134 | |
135 public static int assert_integer(int v) throws LuanException { | 116 public static int assert_integer(int v) throws LuanException { |
136 return v; | 117 return v; |
137 } | 118 } |
138 | 119 |
139 public static long assert_long(long v) throws LuanException { | 120 public static long assert_long(long v) throws LuanException { |
143 public static double assert_double(double v) throws LuanException { | 124 public static double assert_double(double v) throws LuanException { |
144 return v; | 125 return v; |
145 } | 126 } |
146 | 127 |
147 public static float assert_float(float v) throws LuanException { | 128 public static float assert_float(float v) throws LuanException { |
148 return v; | |
149 } | |
150 | |
151 @LuanMethod public static byte[] assert_binary(byte[] v) throws LuanException { | |
152 Utils.checkNotNull(v); | |
153 return v; | |
154 } | |
155 | |
156 public static LuanFunction assert_function(LuanFunction v) throws LuanException { | |
157 Utils.checkNotNull(v); | |
158 return v; | 129 return v; |
159 } | 130 } |
160 | 131 |
161 public static LuanFunction range(final double from,final double to,Double stepV) throws LuanException { | 132 public static LuanFunction range(final double from,final double to,Double stepV) throws LuanException { |
162 final double step = stepV==null ? 1.0 : stepV; | 133 final double step = stepV==null ? 1.0 : stepV; |