Where to store frequently used functions in a OOP correct way
Posted
by
Stefan Kuijers
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Kuijers
Published on 2012-03-28T17:26:42Z
Indexed on
2012/03/28
17:30 UTC
Read the original article
Hit count: 208
I'm working on a project which I want to build up OO. Now I came with a function that checks or a value is valid.
private function valid(value:*, acceptedValues:Array):Boolean {
for(var i:uint = 0; i < acceptedValues.length; i++) {
if (value == acceptedValues[i]) {
return true;
}
}
return false;
}
As you can see, the function is very general and will be accessed across different classes. Now my question is; where do I store it in a OO correct way?
Thanks in advance!
© Stack Overflow or respective owner