• Sayali
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Hello,

 

In Apex, at runtime we want to check if Object obj is of type Set or List where the type of elements in Set/List can be anything like String, Integer etc. 

 

obj (of type Set<String>) instanceOf Set<Object> returns false and we want to avoid having if statements for each possible type of set. 

 

Any pointers would be of great help.

 

-Sayali

  • October 16, 2013
  • Like
  • 0

Hello,

 

In Apex, at runtime we want to check if Object obj is of type Set or List where the type of elements in Set/List can be anything like String, Integer etc. 

 

obj (of type Set<String>) instanceOf Set<Object> returns false and we want to avoid having if statements for each possible type of set. 

 

Any pointers would be of great help.

 

-Sayali

  • October 16, 2013
  • Like
  • 0