473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

What is this pattern called?

You have a class that's returning an immutable set of objects that are
the "same" objects. If you were for some reason representing the
alphabet as full-fledged objects, and each time you requested "A" it
would return the exact same object "A".

Or is this so basic it's not really a "pattern"?

Feb 12 '07 #1
6 1402
flyweight?

http://www.dofactory.com/Patterns/PatternFlyweight.aspx

<ph********@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
You have a class that's returning an immutable set of objects that are
the "same" objects. If you were for some reason representing the
alphabet as full-fledged objects, and each time you requested "A" it
would return the exact same object "A".

Or is this so basic it's not really a "pattern"?

Feb 12 '07 #2
Hi,
<ph********@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
| You have a class that's returning an immutable set of objects that are
| the "same" objects. If you were for some reason representing the
| alphabet as full-fledged objects, and each time you requested "A" it
| would return the exact same object "A".
|
| Or is this so basic it's not really a "pattern"?
|

http://www.dofactory.com/Patterns/PatternFlyweight.aspx
--
Ignacio Machin
machin AT laceupsolutions com
Feb 12 '07 #3
yup, that's what i was looking for. thanks!

Feb 12 '07 #4
negative ghost rider, the pattern is FULL

On Feb 12, 7:14 am, "phillip...@gmail.com" <phillip...@gmail.com>
wrote:
You have a class that's returning an immutable set of objects that are
the "same" objects. If you were for some reason representing the
alphabet as full-fledged objects, and each time you requested "A" it
would return the exact same object "A".

Or is this so basic it's not really a "pattern"?

Feb 14 '07 #5
On Feb 14, 10:00 am, "Larry Linson" <larrylinso...@hotmail.comwrote:
negative ghost rider, the pattern is FULL

On Feb 12, 7:14 am, "phillip...@gmail.com" <phillip...@gmail.com>
wrote:
You have a class that's returning an immutable set of objects that are
the "same" objects. If you were for some reason representing the
alphabet as full-fledged objects, and each time you requested "A" it
would return the exact same object "A".
Or is this so basic it's not really a "pattern"?
huh?

Feb 15 '07 #6
On Feb 14, 10:00 am, "Larry Linson" <larrylinso...@hotmail.comwrote:
negative ghost rider, the pattern is FULL

On Feb 12, 7:14 am, "phillip...@gmail.com" <phillip...@gmail.com>
wrote:
You have a class that's returning an immutable set of objects that are
the "same" objects. If you were for some reason representing the
alphabet as full-fledged objects, and each time you requested "A" it
would return the exact same object "A".
Or is this so basic it's not really a "pattern"?
oh. top gun.

Feb 15 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Xah Lee | last post by:
Python re module has methods flags and pattern. How to use these exactly? e.g. i tried print patternObj.flags() and the error is some "int object is not callable". ...
0
by: Tony Johansson | last post by:
Hello Experts! Some information. In a more general form is the handle body principles called the bridge design pattern. In the handle class you have a delegate that points to an pure abstract...
6
by: Efim | last post by:
Hi all, Due to performance issue, I want to pevent execution of ToString() function in the code like the following: if(reporting_level & DEBUG_LEVEL) log(reporting_level,string.Format("Event of...
1
by: D | last post by:
Lets say we have a tree control with a user as the root node with child nodes that represent test sets they subscribe to (which map directly to sql tables) and related reports (sql stored...
12
by: FluffyCat | last post by:
New on November 28, 2005 for www.FluffyCat.com PHP 5 Design Pattern Examples - the Visitor Pattern. In the Visitor pattern, one class calls a function in another class and passes an instance of...
23
by: Xah Lee | last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a...
3
by: DaTurk | last post by:
Hi, I'm implementing the Idisposable pattern and am wondering what the difference it between managed, and unmanaged resources? http://msdn2.microsoft.com/en-us/library/fs2xkftw.aspx in the...
12
by: Adrian | last post by:
The code below was taken from an example. All the "noise" in the example was thrown out. This is supposedly according to the bridge pattern. What in the code (which lines) represent the bridge...
2
by: lawrence k | last post by:
Suppose I have these five lines in a file somewhere: <p>This entry should belong to: <select name="formInputs"> <option value="">(No choice made)</option> <?php...
6
by: Mike P | last post by:
Can anybody tell me exactly what a provider is? And give an example? *** Sent via Developersdex http://www.developersdex.com ***
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.