首页| 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