Question: I have a `UILabel` with properties set in `IB` (like custom font, shadow color, text color etc). I wanted to print all the properties of this `UILabel` to enable me to use the same set of properties on a different screen inside a `UITableViewCell` `textLabel` property. How do I print all the properties that I have set in my first screen to use it with the `textLabel` property inside `UITableViewCell`?

Answer: 
I would use a

```
Map<Criteria, Message> lookupTable;

```

where `Criteria` is a class you write (and override `equals()` and `hashCode()`), representing the criteria to choose a message.

`Message` is also a class you write, which encapsulates the actual message `String` but also provides you some functionality to set the variables.

With this solution you have to initialize the map once at the beginning of your program and can always use it like this:

```
Criteria criteria = ... // gather your criteria somehow
Message msg = lookupTable.getMessage(criteria);
// use your variable setting methods here
String message = msg.toString();

```
If you have so many conditions, you cant avoid putting those conditions some where in the code.
The advantages of using lookup table is
1)Easy to implement.
2)Flexible.If you want to change the value of some message in future, you can go to looktable class and change.