Created
January 16, 2015 20:51
-
-
Save dancinllama/db092429aec6a95452b6 to your computer and use it in GitHub Desktop.
Keep thy code stupid simple (KISS) - bad example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean isTrue(boolean myBool){ | |
if(myBool){ | |
return true; | |
}else{ | |
return false; | |
} | |
} | |
public Map<Id,Contact> getContactMap(){ | |
Map<Id,Contact> contactMap = new Map<Id,Contact>(); | |
List<Contact> contacts = [Select Id From Contact]; | |
if(contacts != null && contacts.size() > 0 && !contacts.isEmpty()){ | |
for(Integer i=0; i < contacts.size(); i++){ | |
contactMap.put(contacts.get(i).Id,contacts.get(i)); | |
} | |
} | |
return contactMap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment