首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 紧凑的不可变数据结构的canonicalizing他们

紧凑的不可变数据结构的canonicalizing他们

资 源 简 介

This small utility can be used at runtime to remove unneccessary references to immutable objects from memory. this works by cutting them into their components and rearranging them to create an object that looks like the original, but all redundancies are removed. For example List intern = deepInterner.intern(ImmutableList.of(-1234, -1234));//this will only work with a DEEP interner assertTrue(intern.get(0) == intern.get(1)); This Project uses guava-libraries as a dependency. To detect if an object is immutable, it relies on a recursive checker for truly immutable objects (most safe way) a rough list of known JDK immutables (tbd) a list of provided @Immutable annotations the ImmutableXXXX collections in the guava-libraries please bear in mind this is the first draft and you should not use this code in a mission-critical application.
VIP VIP
  • huangshu 1天前 成为了本站会员

  • 贾金达 1天前 成为了本站会员

  • 云梦无痕 1天前 成为了本站会员

  • 2天前 成为了本站会员

  • huangshu 2天前 成为了本站会员

  • Wx 1周前 成为了本站会员

  • adalyx 1周前 成为了本站会员

  • 1周前 成为了本站会员

  • 知还 1周前 成为了本站会员

  • zcl 1周前 成为了本站会员

0.226097s