Problem I implemented a fixed-length stack in Java for use in my fractal generator program, an RPN calculator and my […]
Tag: generics
Generic wrapper for single value or array of values
Problem I’m writing a chart.js port for c# blazor (you can find it here) using C# 8.0 with .NET Core […]
Functional interface uses uncheck or unsafe operations
Problem First of all, I am absolutely surprised that this code even works. Originally what I did was create a […]
Many interfaces and lots of inheritance vs few interfaces and less inheritance? [closed]
Problem Closed. This question is off-topic. It is not currently accepting answers. Questions containing broken code or asking for advice […]
Method for create a copy of List
Problem I created a method to return a copy of List<T>, basically I convert the List<T> into an array T[], […]
Removing exact instances of elements in one list from another
Problem Basically, here’s the problem statement: Given an IEnumerable<T> source and an IEnumerable<T> exceptions, return an IEnumerable<T> result which contains […]
Generic array flattening function
Problem With help from the codereview community, I’ve written a function to flatten a generic nested array. I have it […]
Scala Option conversion to Java
Problem Summary: I’ve implemented what I think is a complete Java implementation of the Scala Option class. Could you please […]
Related classes around generic types
Problem I’m wondering if this code can be simplified. I’m less than thrilled about the fact that I repeat the […]
Client trip type contracts
Problem I want to make this code generic, so that I could remove if/else and recursive for loops. I am […]