Read only Vector
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sriram_Sundararajan
Posted On:   Monday, June 2, 2003 05:33 AM

hi all

for my client i need to give only read only vector. That is he can see the objects inside the vector, but he can't add any objects into the vector. Is it possible i.e Is there any option to make the vector as READ-ONLY.

regards

sri

Re: Read only Vector

Posted By:   haranadha_raju  
Posted On:   Wednesday, June 4, 2003 11:26 PM

How bout creating a Java class with a vector as a private data element.

You can give a public method for read..and no one will be able to access the vector and therefore write any data to it.

Re: Read only Vector

Posted By:   Anonymous  
Posted On:   Monday, June 2, 2003 05:47 AM

Check the unmodifiableList method in java.util.Collections.
About | Sitemap | Contact