??xml version="1.0" encoding="utf-8" standalone="yes"?>久久一二三四,黄色成人在线观看网站,亚洲大全视频http://www.aygfsteel.com/lhulcn618/zh-cnSun, 18 May 2025 19:46:20 GMTSun, 18 May 2025 19:46:20 GMT60使用Vertx+Ignite+MongoDB搭徏大DAU游戏服务?/title><link>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433487.html</link><dc:creator>北国gh的BloG</dc:creator><author>北国gh的BloG</author><pubDate>Tue, 13 Nov 2018 06:29:00 GMT</pubDate><guid>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433487.html</guid><wfw:comment>http://www.aygfsteel.com/lhulcn618/comments/433487.html</wfw:comment><comments>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433487.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lhulcn618/comments/commentRss/433487.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lhulcn618/services/trackbacks/433487.html</trackback:ping><description><![CDATA[     摘要: 最q在funplus做游戏,q而研I了一个新型架构。之前做游戏都是自己使用java搭徏架构Q经q几q的U篏实也达C最初的设想Q多q程Q进E内多线E,无锁Q?延迟Ujdbc写库。对于单服架构来_(d)已经近于极致。今q小游戏盛行Q如L(fng)来了Q疯狂游戏那家公司,全部使用的都是go+mongodb实现的,因ؓ(f)go的语aU别支援高ƈ发,q点是java无法比拟的。不qjava开源项目多Q有很多的高手铺垫了...  <a href='http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433487.html'>阅读全文</a><img src ="http://www.aygfsteel.com/lhulcn618/aggbug/433487.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lhulcn618/" target="_blank">北国gh的BloG</a> 2018-11-13 14:29 <a href="http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433487.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>好久不更新Blog了?/title><link>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433486.html</link><dc:creator>北国gh的BloG</dc:creator><author>北国gh的BloG</author><pubDate>Tue, 13 Nov 2018 03:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433486.html</guid><wfw:comment>http://www.aygfsteel.com/lhulcn618/comments/433486.html</wfw:comment><comments>http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433486.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lhulcn618/comments/commentRss/433486.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lhulcn618/services/trackbacks/433486.html</trackback:ping><description><![CDATA[<div><span style='display: inline !important; float: none; background-color: transparent; color: #000000; font-family: verdana,"courier new"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;'>好久不写blog了,我都已经从完?》创?》创业失?》开心网-》创?》创业失?》蓝?》funplusC很多的历E了?/span></div><strong></strong><em></em><u></u><sub></sub><sup></sup><strike></strike><strong></strong><em></em><u></u><sub></sub><sup></sup><strike></strike><img src ="http://www.aygfsteel.com/lhulcn618/aggbug/433486.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lhulcn618/" target="_blank">北国gh的BloG</a> 2018-11-13 11:31 <a href="http://www.aygfsteel.com/lhulcn618/archive/2018/11/13/433486.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RSA?/title><link>http://www.aygfsteel.com/lhulcn618/archive/2012/03/15/371948.html</link><dc:creator>北国gh的BloG</dc:creator><author>北国gh的BloG</author><pubDate>Thu, 15 Mar 2012 07:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/lhulcn618/archive/2012/03/15/371948.html</guid><wfw:comment>http://www.aygfsteel.com/lhulcn618/comments/371948.html</wfw:comment><comments>http://www.aygfsteel.com/lhulcn618/archive/2012/03/15/371948.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lhulcn618/comments/commentRss/371948.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lhulcn618/services/trackbacks/371948.html</trackback:ping><description><![CDATA[那我l你解释下RSA吧,量让你看懂Q?br />*RSA是非对称加密体系Q也是说加密用一个公钥,解密用一个私钥,q?个密钥不同,q点非常非常重要?br /><br />其实RSA非常z,但很?br /><br />程<br />1Q寻?个大的素数pQq  n=p*q=33  N=Qp-1Q?Qq-1Q?20<br />公钥e一般是3 U钥d要通过公钥eȝ出来 <br />e*d=1(mod N) 是说e和d的乘U模N? 也就是e和d关于模N互ؓ(f)逆元<br />3*7=1Qmod 20Q?可知d=7<br /><br />加密的明文设为M 加密后的密文设ؓ(f)c<br />加密q程QC=M^e(mod n)<br />解密q程QM=C^d(mod n)<br /><br />举个具体的例?假如M=2<br />加密q程QC=2^3(mod 33)=8(mod 33)<br />解密q程QM=8^7(mod 33)=2097152(mod 33)=2(mod 33) 可以看出和和本来的明文是相同的?br /><br />原理可以理解?M=M^(ed)  (mod n)<br />本例?e*d=21  也就是是M^21ơ方{于M<br />RSAq个Ҏ(gu)是数论中的贚w定理推出?br /><br />在讲讲细?比如g加密的是26的字?当明文的值是??6<br />拿n=33说吧 加密后的密文的值是1?3 q很正常 <br />但是解密?一定和明文的值相?也就??6<br /><br />实际情况?公钥e是公开?U钥d是保密的<br />比如甲要l乙发个东西 乙的公钥׃是公开?所以甲知道 但甲不知道乙的私?br />甲先用乙的公钥加?nbsp; 之后 q个密文只能用乙的私?׃乙的U钥是保密的 只有他自q?所以保证了安全<br /><br />RSA最大的安全问题?n的分?只要把n分解为p*q 则N=Qp-1Q(q-1Q?br />Ҏ(gu) e*d=1Qmod NQ?可以通过e出d 那么U钥都被人算出来?也就没安全性而言?br />不过可惜的是 大数分解是一个单向的函数 你算知道pQqn很容易,但是知道n出pQq相当?br /><br />一?n是加密解密用?N是知道ed?br /><br />g也没说你要干?想看懂就q么?br />如果要实现这个算法:(x)<br />必须知道2点:(x)<br />1.pQqq个两个大素数的生成Q这牉|到素性检验,数论中是一章的内容Q没法和你展开<br />2.取模q算Q由于加密解密过E可能取一个数的几十次方的模数Q所以这个必ȝ便的法来化解复杂度Q也是模重复^方算法?br /><br />如果要编E中使用Q太Ҏ(gu)?br />M个dll<br />在java?直接有可用于RSA的类 相当Ҏ(gu) <br /><br /><br /> <div id="wmqeeuq" class="articalContent " id="sina_keyword_ad_area2"> <div> <wbr> <table class="seyle4" cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr> <td id="content9" valign="middle"> <p><strong style="font-size: 14px"><font style="font-size: 16px">对称加密法Q非对称加密法</font></strong><strong style="font-size: 14px"><font style="font-size: 16px"> </font></strong></p></td></tr> <tr> <td> <div align="right"> <wbr></div></td></tr></tbody></table> <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr> <td height="3"> <wbr></td></tr></tbody></table> <table style="table-layout: fixed" cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> <tbody> <tr> <td> <p><span id="wmqeeuq" class="oblog_text"><span id="wmqeeuq" class="oblog_text"></span>常见的加密算法可以分成三c,对称加密法Q非对称加密法和Hash法?/span></p> <p>对称加密</p> <p>指加密和解密使用相同密钥的加密算法。对U加密算法的优点在于加解密的高速度和用长密钥时的隄解性。假设两个用户需要用对U加密方法加密然后交换数据,则用h需?个密钥ƈ交换使用Q如果企业内用户有n个,则整个企业共需要n×(n-1) 个密钥,密钥的生成和分发成Z业信息部门的恶梦。对U加密算法的安全性取决于加密密钥的保存情况,但要求企业中每一个持有密钥的人都保守U密是不可能的,他们通常?x)有意无意的把密钥泄漏出?#8212;—如果一个用户用的密钥被入侵者所获得Q入侵者便可以d该用户密钥加密的所有文档,如果整个企业q一个加密密钥,那整个企业文档的保密性便无从谈v?/p> <p>常见的对U加密算法有DES?DES、Blowfish、IDEA、RC4、RC5、RC6和AES</p> <p>非对U加?/p> <p>指加密和解密使用不同密钥的加密算法,也称为公U钥加密。假设两个用戯加密交换数据Q双方交换公钥,使用时一方用Ҏ(gu)的公钥加密,另一方即可用自己的私钥解密。如果企业中有n个用P企业需要生成n对密钥,q分发n个公钥。由于公钥是可以公开的,用户只要保管好自qU钥卛_Q因此加密密钥的分发变得十分简单。同Ӟ׃每个用户的私钥是唯一的,其他用户除了可以可以通过信息发送者的公钥来验证信息的来源是否真实Q还可以保发送者无法否认曾发送过该信息。非对称加密的缺Ҏ(gu)加解密速度要远q慢于对U加密,在某些极端情况下Q甚臌比非对称加密慢上1000倍?/p> <p>常见的非对称加密法有:(x)RSA、ECCQ移动设备用Q、Diffie-Hellman、El Gamal、DSAQ数字签名用Q?/p> <p>Hash法</p> <p>Hash法特别的地方在于它是一U单向算法,用户可以通过Hash法对目标信息生成一D늉定长度的唯一的Hash|却不能通过q个Hash值重新获得目标信息。因此Hash法常用在不可还原的密码存储、信息完整性校验等?/p> <p>常见的Hash法有MD2、MD4、MD5、HAVAL、SHA</p> <p>加密法的效能通常可以按照法本n的复杂程度、密钥长度(密钥长安全)(j)、加解密速度{来衡量。上q的法中,除了DES密钥长度不够、MD2速度较慢已逐渐被淘汰外Q其他算法仍在目前的加密pȝ产品中?/p></td></tr></tbody></table></div></div><img src ="http://www.aygfsteel.com/lhulcn618/aggbug/371948.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lhulcn618/" target="_blank">北国gh的BloG</a> 2012-03-15 15:37 <a href="http://www.aygfsteel.com/lhulcn618/archive/2012/03/15/371948.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>2008.9.23 - 2011.8.10 本h在千工?051天后d了它Q去了另外完l做|http://www.aygfsteel.com/lhulcn618/archive/2011/08/28/357437.html北国gh的BloG北国gh的BloGSun, 28 Aug 2011 05:49:00 GMThttp://www.aygfsteel.com/lhulcn618/archive/2011/08/28/357437.htmlhttp://www.aygfsteel.com/lhulcn618/comments/357437.htmlhttp://www.aygfsteel.com/lhulcn618/archive/2011/08/28/357437.html#Feedback0http://www.aygfsteel.com/lhulcn618/comments/commentRss/357437.htmlhttp://www.aygfsteel.com/lhulcn618/services/trackbacks/357437.html千橡与我Q一个公怸员工之间像恋h一P从最早的相识Q相爱,拼搏Q挽留,qxEQ最l不再l走下去?br />
其实都还相爱Q但必须面对现实Q不再会(x)被记忆和d时生的痛苦蒙蔽自己的双眹{?br />



北国gh的BloG 2011-08-28 13:49 发表评论
]]>
linux一些命?/title><link>http://www.aygfsteel.com/lhulcn618/archive/2011/01/19/343218.html</link><dc:creator>北国gh的BloG</dc:creator><author>北国gh的BloG</author><pubDate>Wed, 19 Jan 2011 08:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/lhulcn618/archive/2011/01/19/343218.html</guid><wfw:comment>http://www.aygfsteel.com/lhulcn618/comments/343218.html</wfw:comment><comments>http://www.aygfsteel.com/lhulcn618/archive/2011/01/19/343218.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lhulcn618/comments/commentRss/343218.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lhulcn618/services/trackbacks/343218.html</trackback:ping><description><![CDATA[netstat -nlpt ?0端口有没有httpd服务 <br /> ps aux | grep httpd 看有没有httpdq程<br /> <br /> locate httpd<br /> <br /> service httpd status<br /> <br /> service httpd configtest<br /> <img src ="http://www.aygfsteel.com/lhulcn618/aggbug/343218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lhulcn618/" target="_blank">北国gh的BloG</a> 2011-01-19 16:26 <a href="http://www.aygfsteel.com/lhulcn618/archive/2011/01/19/343218.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Javac,jar & java参数详解 http://www.aygfsteel.com/lhulcn618/archive/2010/12/09/340131.html北国gh的BloG北国gh的BloGThu, 09 Dec 2010 04:55:00 GMThttp://www.aygfsteel.com/lhulcn618/archive/2010/12/09/340131.htmlhttp://www.aygfsteel.com/lhulcn618/comments/340131.htmlhttp://www.aygfsteel.com/lhulcn618/archive/2010/12/09/340131.html#Feedback0http://www.aygfsteel.com/lhulcn618/comments/commentRss/340131.htmlhttp://www.aygfsteel.com/lhulcn618/services/trackbacks/340131.htmljavac

 

用法Qjavac <选项> <源文?gt;
其中Q可能的选项包括Q?br />   -g                                                       生成所有调试信?br />   -g:none                                             不生成Q何调试信?br />   -g:{lines,vars,source}                    只生成某些调试信?br />   -nowarn                                            不生成Q何警?br />   -verbose                                           输出有关~译器正在执行的操作的消?br />   -deprecation                                    输出使用已过时的 API 的源位置
  -classpath <路径>                          指定查找用户cL件的位置
  -cp <路径>                                       指定查找用户cL件的位置
  -sourcepath <路径>                       指定查找输入源文件的位置
  -bootclasspath <路径>                  覆盖引导cL件的位置
  -extdirs <目录>                               覆盖安装的扩展目录的位置
  -endorseddirs <目录>                   覆盖{֐的标准\径的位置
  -d <目录>                                        指定存放生成的类文g的位|?br />   -encoding <~码>                          指定源文件用的字符~码
  -source <版本>                              提供与指定版本的源兼Ҏ(gu)?br />   -target <版本>                                 生成特定 VM 版本的类文g
  -version                                            版本信息
  -help                                                 输出标准选项的提?br />   -X                                                      输出非标准选项的提?br />   -J<标志>                                          直接?<标志> 传递给q行时系l?br />

jar


用法Qjar {ctxu}[vfm0Mi] [jar-文g] [manifest-文g] [-C 目录] 文g?...
选项Q?br />     -c  创徏新的存档
    -t  列出存档内容的列?br />     -x  展开存档中的命名的(或所有的〕文?br />     -u  更新已存在的存档
    -v  生成详细输出到标准输Z
    -f  指定存档文g?br />     -m  包含来自标明文g的标明信?br />     -0  只存储方式;未用ZIP压羃格式
    -M  不生所有项的清单(manifest〕文?br />     -i  为指定的jar文g产生索引信息
    -C  改变到指定的目录Qƈ且包含下列文Ӟ(x)
如果一个文件名是一个目录,它将被递归处理?br /> 清单Qmanifest〕文件名和存档文件名都需要被指定Q按'm' ?'f'标志指定的相同顺序?br /> CZ1Q将两个class文g存档C个名?'classes.jar' 的存档文件中Q?br />        jar cvf classes.jar Foo.class Bar.class
CZ2Q用一个存在的清单QmanifestQ文?'mymanifest' ?foo/ 目录下的所?br />            文g存档C个名?'classes.jar' 的存档文件中Q?br />        jar cvfm classes.jar mymanifest -C foo/ .

java



用法: java [-选项] c?[参数...]
           (执行一个类)
   或?java [-选项] -jar jar文g [参数...]
           (执行一个jar文g)
其中Q可能的选项包括Q?br />     -client       选择 "client" VM(ginger547:应该是指Virtual Machine)
    -server     选择 "server" VM
    -hotspot      ?"client" VM同义  [不赞成]
                  默认情况的VM是client.
    -cp <一个文件夹和zip/jar文gl成的类搜烦(ch)路径>
    -classpath <一个文件夹和zip/jar文gl成的类搜烦(ch)路径>
                 一个由文g夹,JAR压羃文gQ或者ZIP压羃文gl成的用来搜索类的列?br />     -D<名字>=<?gt;
                  讄一个系l属?br />     -verbose[:class|gc|jni]
                  使详l输出变的可?br />     -version      打印产品版本然后退?br />     -version:<?gt;
                  只运行指定版?br />     -showversion  打印产品版本后l?br />     -jre-restrict-search | -jre-no-restrict-search
                  在版本搜索的时候,包含/排除用户Uh的JRE
    -? -help      打印帮助信息
    -X            打印非标准选项帮助
    -ea[:<包名>...|:<cd>]
    -enableassertions[:<包名>...|:<cd>]
                 使断a可用
    -da[:<包名>...|:<cd>]
    -disableassertions[:<包名>...|:<cd>]
                  是断a不可?br />     -esa | -enablesystemassertions
                  使系l断言可用
    -dsa | -disablesystemassertions
                  使系l断言不可?br />     -agentlib:<库名>[=<选项>]
                  加蝲本地代理?lt;库名>,例如. -agentlib:hprof
                  同时可查? -agentlib:jdwp=help?-agentlib:hprof=help
    -agentpath:<路径?gt;[=<选项>]
                  通过全\径名来加载本C理库
    -javaagent:<jar路径>[=<选项>]
                 加蝲Java~程语言代理Q可查看 java.lang.instrument



北国gh的BloG 2010-12-09 12:55 发表评论
]]>
游戏开?/title><link>http://www.aygfsteel.com/lhulcn618/archive/2010/12/01/339493.html</link><dc:creator>北国gh的BloG</dc:creator><author>北国gh的BloG</author><pubDate>Wed, 01 Dec 2010 05:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/lhulcn618/archive/2010/12/01/339493.html</guid><wfw:comment>http://www.aygfsteel.com/lhulcn618/comments/339493.html</wfw:comment><comments>http://www.aygfsteel.com/lhulcn618/archive/2010/12/01/339493.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lhulcn618/comments/commentRss/339493.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lhulcn618/services/trackbacks/339493.html</trackback:ping><description><![CDATA[http://game-develop.net/blog/?p=17 <img src ="http://www.aygfsteel.com/lhulcn618/aggbug/339493.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lhulcn618/" target="_blank">北国gh的BloG</a> 2010-12-01 13:33 <a href="http://www.aygfsteel.com/lhulcn618/archive/2010/12/01/339493.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Mysql查询重复数据 http://www.aygfsteel.com/lhulcn618/archive/2010/08/19/329398.html北国gh的BloG北国gh的BloGThu, 19 Aug 2010 09:27:00 GMThttp://www.aygfsteel.com/lhulcn618/archive/2010/08/19/329398.htmlhttp://www.aygfsteel.com/lhulcn618/comments/329398.htmlhttp://www.aygfsteel.com/lhulcn618/archive/2010/08/19/329398.html#Feedback0http://www.aygfsteel.com/lhulcn618/comments/commentRss/329398.htmlhttp://www.aygfsteel.com/lhulcn618/services/trackbacks/329398.html select a.id,a.nickname from t_player a , t_player b where a.id != b.id and a.nickname = b.nickname

查询重复数据 都列出来

select id,nickname from t_player group by nickname having count(*) > 1;

查询所有重名的数据 只列Z同的?br />

如果惛_除相x据,那样非得要用in了。最好写E序Q用prepareStatementL斎ͼin是不能用索引的,所以超U慢Q所以程序优化相x据库的操作是很有必要的?

北国gh的BloG 2010-08-19 17:27 发表评论
]]>
介绍个好录屏软g。CamtasiaStudio http://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324795.html北国gh的BloG北国gh的BloGTue, 29 Jun 2010 08:58:00 GMThttp://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324795.htmlhttp://www.aygfsteel.com/lhulcn618/comments/324795.htmlhttp://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324795.html#Feedback0http://www.aygfsteel.com/lhulcn618/comments/commentRss/324795.htmlhttp://www.aygfsteel.com/lhulcn618/services/trackbacks/324795.html


北国gh的BloG 2010-06-29 16:58 发表评论
]]>
我也来说说java泛型http://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324774.html北国gh的BloG北国gh的BloGTue, 29 Jun 2010 06:08:00 GMThttp://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324774.htmlhttp://www.aygfsteel.com/lhulcn618/comments/324774.htmlhttp://www.aygfsteel.com/lhulcn618/archive/2010/06/29/324774.html#Feedback0http://www.aygfsteel.com/lhulcn618/comments/commentRss/324774.htmlhttp://www.aygfsteel.com/lhulcn618/services/trackbacks/324774.html 传统我们都是定一个类型,带T?/p>
public class RandomSelection<T> {

  
private java.util.Random random = new Random();

  
private ArrayList<T> list;

  
public RandomSelection() {

     list 
= new ArrayList<T>();

  }


  
public void add(T element) {

     list.add(element);

  }


  
public T getRandomElement() {

     
int index = random.nextInt(list.size());

     
return list.get(index);

  }



}


直接来用。当我们new RandomSelection<String>()  new RandomSelection<Integer>() 的时候,里面的方法的cdQ也q定了?br />
public interface ISomeReason<extends Enum<X>> {

   
public X getImplClassType();

}

实现一个子cR这里看到承是传入了接口泛型中的X参数Q参数就是实现类自己的类型?br />
public enum ATypeReason implements ISomeReason<ATypeReason> {

   ABC(
1),
   DEF(
2),

   ;
   
int index;

   
private ATypeReason(int param)
   
{
      
this.index = param;
   }


   
public int getIndex()
   
{
       
return this.index;
   }


   @Override
   
public ATypeReason getImplClassType() {
      
return this
   }


}

你也可以直接实现Q不传入XQ那么在使用q个cd的实例去传入某一个指定类型的Ҏ(gu)参数Ӟ?x)提C错误,不利于代码健壮性?br />
public class MainTest {

   
public static void useATypeReason(ISomeReason<ATypeReason> reason)
{
    sysout(reason.getImplClassType().getIndex());
}


   
//ATypeReason的类型没有指定泛型参数适用于掉q个接口
   public static void dontCareParamType(ISomeReason<?> reason)
   
{
      sysout(reason.getImplClassType());
      
//不能调用
       sysout(reason.getImplClassType().getIndex());
   }


}

你可以把ISomeReason接口定义如下Q更严格?br />
public interface ISomeReason<extends Enum<E> & ISomeReason<E>> {

   
public E type();

}



北国gh的BloG 2010-06-29 14:08 发表评论
]]>
վ֩ģ壺 пǰ| | | گ| ֣| ƽң| ɽ| ̨| | | Ѱ| | ҽ| | | | | ƽ| ŷ| º| | | | | | | | ػ| | żҴ| | | | ϳ| | | | ī񹤿| ¹| | Ͻ|