Hi Daniel,
there are several ways to implement data access with java.
Hm. But maybe you are right. I implemented the class the
way I did to improve performance. The variables do have the "final" statement,
so they cant be changed after creation of an instance.
Sincerely
Alex
Daniel Rall schrieb:
> I'm trying to understand the use of the public member variables
> instead of accessor methods.  Are they to make the Java data
> structures look more like the C structures?  If so, is this a good
> idea?
>
> XelaRellum@tigris.org writes:
>
> > Author: XelaRellum
> > Date: 2001-11-28 08:42 GMT
> > New Revision: 544
> >
> > Modified:
> >    trunk/subversion/bindings/java/jni/org/tigris/subversion/lib/Entry.java
> > Log:
> > now Entry.java reflects svn_wc_entry_t
> >
> > Modified: trunk/subversion/bindings/java/jni/org/tigris/subversion/lib/Entry.java
> > ==============================================================================
> > --- OLD/trunk/subversion/bindings/java/jni/org/tigris/subversion/lib/Entry.java       Wed Nov 28 02:42:43 2001
> > +++ NEW/trunk/subversion/bindings/java/jni/org/tigris/subversion/lib/Entry.java       Wed Nov 28 02:42:43 2001
> > @@ -16,6 +16,9 @@
> >   * ====================================================================
> >   **/
> >
> > +import java.util.Date;
> > +import java.util.Hashtable;
> > +
> >  public class Entry {
> >      public final static int SCHEDULE_NORMAL=0;
> >      public final static int SCHEDULE_ADD=1;
> > @@ -33,20 +36,27 @@
> >      public final static int NODEKIND_DIR = 2;
> >      public final static int NODEKIND_UNKNOWN = 3;
> >
> > +    public final long revision;
> >      public final String url;
> > -    public final int revision;
> >      public final int nodeKind;
> >      public final int schedule;
> >      public final int existence;
> > +    public final Date text_time;
> > +    public final Date prop_time;
> > +    public final Hashtable attributes;
> >
> > -    public Entry(String url, int revision,
> > -              int nodeKind, int schedule, int existence)
> > +    public Entry( long _revision, String _url, int _nodeKind,
> > +                  int _schedule, int _existence, Date _text_time,
> > +                  Date _prop_time, Hashtable _attributes )
> >       {
> > -         this.url = url;
> > -         this.revision = revision;
> > -         this.nodeKind = nodeKind;
> > -         this.schedule = schedule;
> > -         this.existence = existence;
> > +         url = _url;
> > +         revision = _revision;
> > +         nodeKind = _nodeKind;
> > +         schedule = _schedule;
> > +         existence = _existence;
> > +            text_time = _text_time;
> > +            prop_time = _prop_time;
> > +            attributes = _attributes;
> >       }
> >  }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006