Top "Utility-method" questions

For questions regarding utility class methods.

How can I create an utility class?

I want to create a class with utility methods, for example public class Util { public static void f (int i) {...} …

java utility utility-method
If a "Utilities" class is evil, where do I put my generic code?

I generally live by the rule that Global variables / functions are evil and that every piece of code should live …

c# oop global-variables utility-method
Where to put utility functions in a React-Redux application?

In a React-Redux application, I've got a state like this: state = { items: [ { id: 1, first_name: "John", last_name: "Smith", country: "…

javascript oop reactjs redux utility-method
Utility method to convert Boolean into boolean and handle null in Java

Is there a utility method in Java which converts Boolean into boolean and automatically handles null reference to Boolean as …

java boolean utility-method
Where shall I put my utilities classes in a ASP.NET MVC3 application?

I am developing a web application in ASP.NET MVC3 with C# and Razor. I need to create an utility …

asp.net-mvc-3 class-library code-reuse utility-method
how to pass parameter to static initialize block

What I want to do is load key/value pairs from a file (excel file using Apache poi) into a …

java oop file-io singleton utility-method
Are interfaces a valid substitute for utility classes in Java 8?

For the past decade or so, I've been using the pattern below for my Java utility classes. The class contains …

java class interface java-8 utility-method
Find common parent-path in list of files and directories

I got a list of files and directories List<string> pathes. Now I'd like to calculate the deepest …

c# string url utility-method
Is it possible to pass class as a parameter in a function in Flutter?

Here, I have a utility class in which I have a function for showing DialogBox, so I'm trying to make …

flutter utility-method flutter-alertdialog
Best practices for JQuery namespaces + general purpose utility functions

What are some current "rules of thumb" for implementing JQuery namespaces to host general purpose utility functions? I have a …

jquery namespaces utility-method