While Posted October 26, 2013 Share Posted October 26, 2013 static PriceGrab getInstance I hate static Its the singleton pattern used to avoid multiple object creationsI know Link to comment Share on other sites More sharing options...
FrostBug Posted January 3, 2014 Share Posted January 3, 2014 (edited) Looks useful; but.. Why would you make a singleton without a defined constructor :E? The purpose of singleton is to prevent multiple instances, hence a private constructor.. and the only reason u would do this is in cases where the class holds some sort of reference that should not be created multiple instances of; like a connection. But you create a new one every time anyway? also, is this on purpose? final String AVERAGE = "average",LOW= "recent_high", HIGH="recent_low"; HIGH = low and LOW = high? Edited January 3, 2014 by FrostBug Link to comment Share on other sites More sharing options...
lolmanden Posted January 3, 2014 Share Posted January 3, 2014 OH AWESOME! Link to comment Share on other sites More sharing options...