Object reference

0

How far is a reference to an object exactly like it?

I'll explain my situation:

Inside an adapter , I need to print a certain item in a list. The coloring criteria for this item is in an object that is outside of my adapter .

This object is a map with the relationship between users and channels in an IRC network. And the criterion is the user level on the channel.

If I had an instance of the channel class inside the adapter , it would help me a lot, but how do I know if this instance will accurately reflect the channel status within the IRC client?

The channel is obtained as follows:

    // objeto que mapeia usuarios-canais
    UserChannelDao dao = ircClient.getUserChannelDao();

    // objeto que representa o canal 
    Channel canal = dao.getChannel("#canal");

Is it safe to keep a channel object within the adapter ?

    
asked by anonymous 30.09.2014 / 20:26

0 answers