java Programming Glossary: cleaner
Pass an array to a wrapped function as pointer+size or range http://stackoverflow.com/questions/11584599/pass-an-array-to-a-wrapped-function-as-pointersize-or-range to generate end for you. The original way shown gives a cleaner interface in Java with the added advantages of not making excessive..
Why is Java Vector class considered obsolete or deprecated? http://stackoverflow.com/questions/1386275/why-is-java-vector-class-considered-obsolete-or-deprecated example of poor design the decoration approach gives cleaner separation of concerns. As for a Stack equivalent I'd look at..
Why is using a wild card with a Java import statement bad? http://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad Java import statement bad It is much more convenient and cleaner to use a single statement like import java.awt. than to import..
Netty vs Apache MINA http://stackoverflow.com/questions/1637752/netty-vs-apache-mina time to play around with Netty. We especially liked the cleaner API and much better documentation. Performance seemed better..
Is there a Java equivalent to C#'s 'yield' keyword? http://stackoverflow.com/questions/1980953/is-there-a-java-equivalent-to-cs-yield-keyword will work on Android . Interface Aviad's library has a cleaner interface here's an example Iterable Integer it new Yielder..
Java protected fields vs public getters http://stackoverflow.com/questions/2279662/java-protected-fields-vs-public-getters I like all my fields to be private it provides a cleaner separation between API and implementation. I regard the relationship..
How can I avoid garbage collection delays in Java games? (Best Practices) [closed] http://stackoverflow.com/questions/2484079/how-can-i-avoid-garbage-collection-delays-in-java-games-best-practices beginning and end. I'd like to hear if there's something cleaner. I know there must be others out there dealing with this. How..
Java: comparing two Dates to see if they are in the same day http://stackoverflow.com/questions/2517709/java-comparing-two-dates-to-see-if-they-are-in-the-same-day yes Joda Time's LocalDate would make the whole thing much cleaner and easier though the same difficulties involving time zones..
Static nested class in Java, why? http://stackoverflow.com/questions/253492/static-nested-class-in-java-why members it makes sense for it to be static it's a much cleaner approach. As Jon Skeet points out I think it is a better idea..
JSF - get managed bean by name http://stackoverflow.com/questions/2633112/jsf-get-managed-bean-by-name inside a @ManagedBean then using @ManagedProperty is cleaner since it's more declarative. @ManagedProperty # bean private..
Round a double to 2 decimal places http://stackoverflow.com/questions/2808535/round-a-double-to-2-decimal-places since more reliable ways are readily available with cleaner code too . So use this instead Adapted from this answer by Louis..
New Integer vs valueOf http://stackoverflow.com/questions/2974561/new-integer-vs-valueof Integer vs valueOf I was using Sonar to make my code cleaner and it pointed out that I'm using new Integer 1 instead of Integer.valueOf..
System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime() http://stackoverflow.com/questions/368094/system-currenttimemillis-vs-new-date-vs-calendar-getinstance-gettime of this using Joda Time is probably a good idea for the cleaner interface and better performance. share improve this answer..
Memory barriers and coding style over a Java VM http://stackoverflow.com/questions/3964317/memory-barriers-and-coding-style-over-a-java-vm theFooSync f theFoo use f... or possibly since it's cleaner static AtomicReference Foo theFoo void updateFoo final int newA..
How to make a redirection in JSF http://stackoverflow.com/questions/4032825/how-to-make-a-redirection-in-jsf if not present yet . Note for the JSF2 users there is a cleaner way of passing parameters with f viewParam and more robust way..
What is a good use case for static import of methods? http://stackoverflow.com/questions/420791/what-is-a-good-use-case-for-static-import-of-methods extend some.package.DA If so static imports may be a cleaner way of handling this. If you never would have dreamed of extending..
Running junit tests in parallel? http://stackoverflow.com/questions/423627/running-junit-tests-in-parallel in one way or another. I really think it would be a much cleaner solution to run X different test classes in X threads in parallel...
Configuring Spring Security 3.x to have multiple entry points http://stackoverflow.com/questions/4783063/configuring-spring-security-3-x-to-have-multiple-entry-points point out the problem s or if you can show me a better or cleaner way to handle this in code . I'm using Spring Security 3.x...
In Java, when should I create a checked exception, and when should it be a runtime exception? [duplicate] http://stackoverflow.com/questions/499437/in-java-when-should-i-create-a-checked-exception-and-when-should-it-be-a-runti a simple hierarchy of exceptions. This lets me write cleaner code one layer up since I can catch the superclass and only..
What's the point of Guava's Optional class http://stackoverflow.com/questions/9561295/whats-the-point-of-guavas-optional-class would achieve something that null couldn't or in a much cleaner way The only thing I can think of is to use it with Maps that..
|