Java native collection implementation ( or GNU Trove
collection for example)
be persisted by JOAFIP since it can invoke their serialization methods,
But these implementations are not the best for an efficient lazy load and for few memory usage.
JOAFIP collections have additionals features.
So the below collection are provided by JOAFIP to have a more efficient persistence:
(*) - a linked list as java.util.LinkedList, see PTreeList alternative
PTreeList (*)(**) - a tree linked list
PArrayList (*) (**)- an array list as java.util.ArrayList, see PTreeList alternative
PLinkedHashSet (*)(**) - a linked hashset as java.util.LinkedHashSet, see PLinkedTreeSet when element are comparable
PLinkedTreeSet (**) - a linked treeset
PHashSet (*) as java.util.HashSet
PTreeSet as java.util.TreeSet
PLinkedHashMap (*) as java.util.LinkedHashMap
PHashMap (*) as java.util.HashMap
PTreeMap as java.util.TreeMap
Wrapper factory implementation PCollections to obtains here below collecction wrapper implementation:
additional JOAFIP feature:
(*) an implementation of IEqualsHashComparator can be pass to override the equals/hashcode of stored object
(**) also implement Deque and List
Additional Collection interface implementation:
alternative of ArrayList and LinkedList
PLinkedTreeSet, an alternative of LinkedHashSet and PLinkedHashSet when elements are comparable
PLinkedTreeMap, an alternative of LinkedHashMap and PLinkedHashMap when keys are comparable
Iterators instance are also persistable.
Arrays are not good for lazy load efficiency because it load all array in memory, this is bad for memory usage in case of lot of data. Array list and Sun hash based collections internaly use array. Alternatives are PTreeList and JOAFIP hash based collection implementations.