• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

What is use of Backed Collection in java

 
Ranch Hand
Posts: 30
Hibernate Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
can any body elaborate that what is use of Backed Collection in java.

Prateek Singh
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Backed collections, like the ones you get from SortedSet's headSet(), subSet() and tailSet() methods, or SortedMap's headMap(), subMap(), and tailMap()'s methods, are intented as views of a particular section of the larger collection - according to their API documentation. These view collections are conceptually similar to updatable database views, and offer some of the same advantages. Their memory footprint is small, because no data is actually duplicated, as all references point to the same objects, and they can logically partition a large collection making it easier to work with relevant data. A "write-through" view isn't always what you want, though, so it's very important to be aware of that behavior. Some times you actually need a defensive copy of a collection, and directly exposing the results of the methods mentioned earlier would of course violate that. Another kind of backing is what you get when using Arrays.asList() where the returned List is backed by an array.
 
I found a beautiful pie. And a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic