Where to store frequently used functions in a OOP correct way
- by Stefan Kuijers
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!