Sometimes you’ve got to sort a list. Instead of doing our own sort method, you can use the Collections.sort(List list) method. To be sorted, your list elements must be “Comparable” (Like int, String, Date etc…). To do this, the only things to do are to implements the Comparable interface and define the public int compareTo(Object object) method in your element class.
Eclipse 3.4 Ganymede on Ubuntu 8.04 Hardy Heron
Posted by ObLiB on September 9, 2008
Ubuntu Hardy Heron does not have Eclipse 3.4 Ganymede in its deposits. Indeed the Aptitude eclipse installation will install Eclipse 3.2 on your system.
To install Eclipse Ganymede, it must be done manually.
Posted in Eclipse, Ganymede, Ubuntu | Tagged: depots, hardy, install, linux, package | 10 Comments »
1,000 hits !
Posted by ObLiB on September 3, 2008
Hi everyone,
The symbolic 1,000th hit was achieved today!
I’m happy to see that so much people visit my blog 😀
See you! 😉
Posted in The Coffee Machine | Tagged: 1000th | 1 Comment »
XML with Java and JDOM
Posted by ObLiB on August 29, 2008
A few months ago, I worked on a java project which had to manage XML data. The XML data that I had to deal with weren’t very complex so I try to find the easiest way to manage XML data with Java and I found JDOM.
We want to provide a solution for using XML from Java that is as simple as Java itself.
There is no compelling reason for a Java API to manipulate XML to be complex, tricky, unintuitive, or a pain in the neck. JDOMTM is both Java-centric and Java-optimized. It behaves like Java, it uses Java collections, it is completely natural API for current Java developers, and it provides a low-cost entry point for using XML.
While JDOM interoperates well with existing standards such as the Simple API for XML (SAX) and the Document Object Model (DOM), it is not an abstraction layer or enhancement to those APIs. Rather, it provides a robust, light-weight means of reading and writing XML data without the complex and memory-consumptive options that current API offerings provide.
Posted in API, Java | Tagged: jdom, xml | 8 Comments »
The Visitor Pattern
Posted by ObLiB on August 25, 2008
For my work I needed to browse a “tree” to retrieve some data and make operations with it. To manage this, I made some research and I found a design pattern that I didn’t know yet: The Visitor Pattern.
To spread a hierarchy of classes, normally you simply add methods which provide desired behavior. It can happen however that this behavior is not consistent with the logic of the existent object model. It is also possible that you do not have access to existent code. In such situations, it can be impossible to spread the behavior of hierarchy without changing his classes. The Visitor Pattern precisely allows the developer of a hierarchy to insert a support for cases where other developers would like to spread his behavior.
Posted in Design Patterns | Tagged: visitor | 21 Comments »
Subversive in Eclipse Ganymede
Posted by ObLiB on August 20, 2008
While trying to install Subversive on Eclipse Ganymede I get this error :
Cannot find a solution where both Match[requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.team.svn.feature.group/[0.7.1.I20080612-1500,0.7.1.I20080612-1500]] and Match[requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.team.svn.feature.group/[0.7.3.I20080814-1500,1.0.0)] can be satisfied.
Unsatisfied dependency: [org.polarion.eclipse.team.svn.connector.svnkit.feature.group 2.0.3.I20080814-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.team.svn.feature.group/[0.7.3.I20080814-1500,1.0.0)
Unsatisfied dependency: [org.polarion.eclipse.team.svn.connector.svnkit.feature.group 2.0.3.I20080814-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.polarion.eclipse.team.svn.connector.feature.group/0.0.0
Unsatisfied dependency: [org.polarion.eclipse.team.svn.connector.svnkit15.feature.group 2.0.3.I20080814-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.team.svn.feature.group/[0.7.3.I20080814-1500,1.0.0)
Unsatisfied dependency: [org.polarion.eclipse.team.svn.connector.svnkit15.feature.group 2.0.3.I20080814-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.polarion.eclipse.team.svn.connector.feature.group/0.0.0
Unsatisfied dependency: [org.polarion.eclipse.team.svn.connector.feature.group 2.0.3.I20080814-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.team.svn.feature.group/[0.7.3.I20080814-1500,1.0.0)
Posted in Eclipse, Ganymede | Tagged: 3.4, connector, subversive, svn | 55 Comments »
Would you like to take a coffee ?
Posted by ObLiB on August 20, 2008
Hi,
I’m starting this blog just to share and do a backup of the interesting things I found about Java & Eclipse.
I will try to update the blog the most often I can.
Enjoy.
Posted in The Coffee Machine | Tagged: coffee | Leave a Comment »