Re: TimeSpan Convenience



Josef Pfleger wrote:
helo,

What is best-practise to achieve functionality similar to .Net's System.TimeSpan struct in Java?

For now, I've created my own TimeSpan class (http://blog.orange-cactus.org/?p=24) but I wonder what Java-pro's use everyday?

josef

Some similar functionality can be found in

javax.xml.datatype.Duration

which is part of Java 5 (aka 1.5).

Also look at Joda Time:

http://joda-time.sourceforge.net/
.



Relevant Pages

  • TimeSpan Convenience
    ... What is best-practise to achieve functionality similar to .Net's System.TimeSpan struct in Java? ... I've created my own TimeSpan class but I wonder what Java-pro's use everyday? ...
    (comp.lang.java.programmer)
  • Re: how to compare two version strings in java
    ... The Mac, in classial period at least, had a well-defined standard for version numbering, used for system components and applications, both Apple and third-party, based on the NumVersion struct in MacTypes.h: ... syntax of the version strings he's interested in, to parse them into their constituent pieces, and to compare piece by piece. ... But you're right, even if he does know that, there's nothing for it but to parse and compare. ... It may take a few more lines of code in java. ...
    (comp.lang.java.programmer)
  • Re: Function pointers (Callback functions) in Java ?
    ... > a struct, into a heavy, clumsy object. ... > around in memory is not a pleasing prospect. ... Lets compare a C struct to a Java object. ... The Java object typically has one additional field, a pointer ...
    (comp.lang.java.programmer)
  • Using ArrayList (Question)
    ... I have some code that I am converting from C to Java. ... struct a { ... integers and the other stores an array of floats. ...
    (comp.lang.java.programmer)
  • Re: Read binary data file
    ... struct SOME_DATA someData; ... Since this is a Java group I'd like to ... and the unsigned long in a BigInteger ... // data1 = in.readLongwould do. ...
    (comp.lang.java.programmer)