4
votes
3answers
449 views

Java's Boolean class - why not an enum?

It seems to me that the Boolean class is an ideal candidate to be implemented as an enum. Looking at the source code, most of the class is static methods which could be moved unchanged to an enum, ...
0
votes
1answer
83 views

Use global variables or methods in an API's frontend

I am currently designing a graphics library in Java and now it's come to making the frontend I am curious why I have never seen libraries using global variables for their settings/properties - in-fact ...
0
votes
2answers
127 views

Domain Name Lookup

I'm trying to automate the process of sending many domain name lookup requests. I tried to do this by sending for example http request to domain registry site like Whois.net, but I notice they block ...
2
votes
2answers
89 views

Are the IETF BCP 47 language tags defined as enums anywhere in JDK?

Are the IETF BCP 47 language tags defined as enums anywhere in JDK? For Locale.forLanguageTag() we pass values like fr-FR, jp-JP etc. Are there any enums already provided by JDK for it? Or should ...
1
vote
1answer
220 views

Who is responsible for updating the Java API and how can other individuals contribute?

I made a search on google to find out who are the people in Oracle responsible for updating the Java API in other words who are those responsible for adding new classes and methods to the API and ...
1
vote
1answer
209 views

Return values for CRUD methods?

I'm writing a basic web API in Java that does what almost all others do: take input, validate it, then do CRUD operations on the DB. I've written several APIs before, and I've pretty much already ...
2
votes
2answers
290 views

Should I return Collection or ImmutableCollection from a method?

When writing an API in Java, returning an immutable collection of some sort, I've got the option of returning Collection (or List, Map, etc) from the method, or guava's ImmutableCollection (or ...
-1
votes
1answer
138 views

A good way to learn a language and fully understand its features and classes is to try all methods in the API [closed]

I have an idea that to learn a language (i.e. Java)I need to try all methods from language's API; i want to try to use methods from its API. is this a good idea? there are 10 000 methods in Java API. ...
13
votes
3answers
2k views

Joda Time vs Java Time

Although Joda is feature rich and more sophisticated than standard Java time, it may not always be the best thing to use. How do I decide if I should use Joda Time or Java Time in any Java code? Is ...
2
votes
1answer
852 views

OCR API (in Java) with Word (NOT MS-WORD) extraction [closed]

My Situation I need to develop an application which does crowd-sourced Image-To-Text service (just like google's reCaptcha). So I need an OCR API which can find words in an image with some text. ...
14
votes
3answers
651 views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
6
votes
6answers
542 views

Should I continue teaching old Java input methods alongside the new ones?

I've been imparting a Java introduction course for several years. Some slides explain how to read from files and keyboard using BufferedReaders, InputStreams, FileInputStreamReaders etc. I'm adding ...
-2
votes
1answer
252 views

What do ptLineDist and relativeCCW do? [closed]

I saw these methods in the Line2D Java Docs but did not understand what they do? Javadoc for ptLineDist says: Returns the distance from a point to this line. The distance measured is the ...
5
votes
2answers
810 views

Why does the add() method of a Linkedlist return true in Java?

Why does the add method of a Linkedlist return true in Java? http://docs.oracle.com/javase/1.5.0/docs/api/java/util/LinkedList.html#add(E) Why not just make it a void method? I know it says "per the ...
0
votes
3answers
375 views

API design and versioning using EJB

I have an API that is EJB based (i.e. there are remote interfaces defined) that most of the clients use. As the client base grows there are issues with updates to the API and forcing clients to have ...
1
vote
1answer
933 views

What toolkit to use for card game? [closed]

I'm new at this and I was wondering if someone could suggest the most appropriate API to use to make a card game that is: cross-platform two-player peer-to-peer capable of laying out cards (png ...
3
votes
3answers
804 views

Designing an API on top with Java RMI and Rest APIs

I'm working on the backend of a java web application. We have a document repository (Fedora Commons specifically) where we house xml files. I want to abstract the API of the repository internally so ...
5
votes
2answers
162 views

API design involving standard and custom settings

Suppose a class allows some kind of configuration that has some well-known default values but also has the option of defining a custom value. For example, suppose you want to let users configure a ...
18
votes
11answers
3k views

Is it a really required skill to program without API documentation?

I barely passed my Java programming exam today. I had to answer some general questions about threading which I did well and to write a little threaded program which was worse. I had to connect my ...
4
votes
1answer
437 views

Eloqua API Full Code Example in JAVA

Is there anyone out there who has mastered to retrieve some data programmatically from Eloqua? First of all, I'm more or less a newbie, as far as JAVA. I can follow tutorials, take directions and ...
3
votes
1answer
166 views

Thread safe graph libraries

I am looking for a good Java Graph Library which is thread safe for concurrent access. JGraphT, JUNG, JTS are very good but again for concurrent access I will have to synchronize it externally which ...
3
votes
1answer
6k views

What is the best way to comment a deprecated class in Java?

I would like to know the best way to add a comment to identify a deprecated class in Java. Should I remove the previous comment added to the top of the class that helps another programmer to know what ...
0
votes
6answers
672 views

Java API vs. Other APIs [closed]

I'm more at the novice end of the software developer spectrum, but nevertheless I've had exposure to quite a few programming languages and frameworks. From all the technologies I've used, I haven't ...
49
votes
4answers
2k views

Why were Java collections implemented with “optional methods” in the interface?

During my first implementation extending the Java collection framework, I was quite surprised to see that the collection interface contains methods declared as optional. The implementer is expected ...
3
votes
1answer
263 views

Apache Wave API

I'd like to create an application based around Apache Wave. Where can I learn more about working with Apache Wave and/or the API for a locally running instance? At the moment, the extent of what I ...
2
votes
7answers
3k views

What is the best way to remember Java APIs? [duplicate]

I have been doing Java for nearly a year now and I have difficulty remembering Java APIs and method names. What is the best way to remember them?
4
votes
2answers
608 views

What are the best patterns/designs for stateful API development?

I am about to implement a API for my TCP/IP server written in Java. Right now I have a temporary method that takes a String, executes a command based on the String and returns a String basically like ...
10
votes
6answers
3k views

Are Java's public fields just a tragic historical design flaw at this point?

It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would ...
3
votes
1answer
134 views

Legal aspects of Java specification implementations in other programming languages

I am planning to implement an official Java specification in a different programming language. Would this be a copyright violation? Hypothetical examples: a JMX "wrapper" library for C++ which can ...
7
votes
8answers
755 views

Examples of Java APIs that demand an action sequence

As part of a research I'm working on, I'm looking for public APIs that only work correctly when you apply a certain sequence of actions on them. For example, the java.nio.channels.SocketChannel ...