Mercurial Hosting > luan
comparison core/src/luan/modules/Utils.java @ 582:31926755689e
add Thread.synchronized
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 31 Jul 2015 06:20:17 -0600 |
parents | 60c549d43988 |
children | 6ea90dc10375 |
comparison
equal
deleted
inserted
replaced
581:5d4652d78ce0 | 582:31926755689e |
---|---|
9 import java.net.URL; | 9 import java.net.URL; |
10 import java.net.MalformedURLException; | 10 import java.net.MalformedURLException; |
11 import luan.LuanState; | 11 import luan.LuanState; |
12 import luan.LuanException; | 12 import luan.LuanException; |
13 import luan.LuanTable; | 13 import luan.LuanTable; |
14 import luan.LuanFunction; | |
14 | 15 |
15 | 16 |
16 public final class Utils { | 17 public final class Utils { |
17 private Utils() {} // never | 18 private Utils() {} // never |
18 | 19 |
35 checkNotNull(luan,t,"table"); | 36 checkNotNull(luan,t,"table"); |
36 } | 37 } |
37 | 38 |
38 public static void checkNotNull(LuanState luan,Number n) throws LuanException { | 39 public static void checkNotNull(LuanState luan,Number n) throws LuanException { |
39 checkNotNull(luan,n,"number"); | 40 checkNotNull(luan,n,"number"); |
41 } | |
42 | |
43 public static void checkNotNull(LuanState luan,LuanFunction fn) throws LuanException { | |
44 checkNotNull(luan,fn,"function"); | |
40 } | 45 } |
41 | 46 |
42 public static String readAll(Reader in) | 47 public static String readAll(Reader in) |
43 throws IOException | 48 throws IOException |
44 { | 49 { |