Timer class object set time

I want to be able to set the timer to a specfic time. How can I do that?
ActionListener current = new CurrentTimeLabel(); Timer timer  = new Timer(60000, current); There are the objects;
timer.start();
   timer.restart();
   timer.setInitialDelay();I want to be able to set the timer to a specific time, for example 5 seconds.
timer.setTime(5000); If there is actually something that works like my fictional setTime() object that i just came up with to help describe my problem.

There is nothing like that in the API notices. I can not believe they do not have that object ; that is , after the timer is running you can set the its current time.
For example if I construct a Timer like the following;
Timer timer = new Timer(60000, actionlistener);If the current time is 30000 and I want it to be 20000(meaning that the next action event does not get fired for another 40 seconds instead of the current 30 seconds) I should be able to set it to 20000.
All I can do right now is stop the timer reset the initial delay and then start the timer again. The problem here is that while I am waiting for the timer to start again after setting the initial delay an action event does not get fired until the timer starts again.
I have a timer set to be fired every 60 seconds. The problem involves is that I want it to be fired when the computer's clock reaches 00 seconds every time.
What I have done is not to start the timer until the clock is set to 00 seconds. This works fine but over the long run the timer and the computer clock get out of synchroniztion(meaning the computer clock is 20 seconds and the timer is at 25 seconds; I need these to be the same all the time). What I have done right now is what I said above ; that is, every time an actionevent is fired is check and see if the computer clock and the timer are equal if they are not then I stop the timer set the inial delay to the difference in time and then start the timer again. Again this works but if there is a difference then while the timer is getting reset it misses one actionevent being fired. The timer is set to be fired every 60 seconds if there is a difference then on the next minute does not get fired because by setting the intial delay does not start the timer unitl the next minute, meaning the next minute does not have an action event fired when it should have been fired.
The simple solution is to set the timer to a specific time. For example, if the clock is at 15 seconds and the timer is at 00 seconds while reset the timer to 15 seconds; that way an action event never gets missed while trying to reset the timer. It would be a simple object to program and have in that class but it does not exist for some reason. Is there someway I can add an Object .setTime() to the Timer class. So I can program timer.setTime(15000);.
I am guessing only the Java people can add objects to the API classses.

Similar Messages

  • How to tell if a Class object is instantiable at run time ?

    Hi
    Newbie here, I am making some modification to an existing code and need to tell if
    a Class object can be instantiated. My specific object is an abstract class.
    I found I can ask if a Class is an interface via
    Class class = ...;
    if (class.isInterface())
    but could not find anything for abstract classes. Any idea ? Thanks

    baftos wrote:
    Modifier.isAbstract(clazz.getModifiers())Edited by: baftos on May 30, 2009 9:38 AMThis only covers the case of an abstract class. Below is a more robust solution. However even this solution has gaps - For instance, it is definitely possible to instantiate a URL object, but you've kind of got to know how to do it if you want to avoid a malformedURLException. If we are just talking about being able to instantiate the default constructor, this will suffice
    package tjacobs.test;
    import java.lang.reflect.Constructor;
    public class Test {
         public static class Bar {
              public static void install() {
              public Bar() {}
         public static abstract class Foo {
              public static void install() {
              public Foo() {}
         public static class FooBar {
              public static void install() {
              private FooBar() {}
         public static void abstractTest() {
    //          Foo.install();
    //          Bar.install();
    //          FooBar.install();
              abstractTest("tjacobs.test.Test");
              abstractTest("tjacobs.test.Test$Foo");
              abstractTest("tjacobs.test.Test$Bar");
              abstractTest("tjacobs.test.Test$FooBar");
         public static void abstractTest(String str) {
              Class c = null;
              try {
                   c = Class.forName(str);
              catch (Exception ex) {
                   ex.printStackTrace();
              try {
                   Constructor con = c.getConstructor(new Class[] {});
                   Object obj = con.newInstance(new Object[] {});
                   System.out.println("Can instatiate");
              catch (Exception ex) {
                   System.out.println("Cannot instantiate!");
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              abstractTest();
    }

  • Please help how to set/get a class object in hashtable or hashmap?

    Hi, everybody.
    I'd like to generate a class-object list in hashtable.
    However, compilation is error. Here is my code:
    Hashtable ht = new Hashtable();
    Class tmp_obj;
    tmp_obj = Class.forName("my_class_name_1");
    ht.put("my_class_name_1", tmp_obj);
    tmp_obj = Class.forName("my_class_name_2");
    ht.put("my_class_name_2", tmp_obj);
    Class selected_object = ht.get("my_class_name");
    ^here compilation error: incompitable types
    Could anybody tell me where is wrong in my code and how to
    correct it?
    Thank you in advance.
    Jeff

    Look at the javadoc for Hashtable. The get method returns an Object. You will need to cast it to a Class object.
    Class selected_object = (Class)ht.get( "my_class_name" );If you are using JDK5.0, then you should look up generics.

  • How to get a LabVIEW class object to expose an invoke-node method?

    Hi,
          I like the property/invoke-node "paradigm" used for interacting with "objects".  Can LabVIEW-class objects expose their properties and methods this way?  Can one or more LabVIEW-class objects be compiled into a library or "assembly" (or other distrubution format) that allows the property/invoke-node usage?
    I've looked at (but not completely understood) "Creating LabVIEW Classes".  Have also searched for related posts.
    The pic below shows an invoke node wired to a class with a Public VI "VAT.Status.Hello.vi".  I'd like to see VAT.Status.Hello show-up as a Method.  (I just tried "Select Method", and selected "VAT.Status.Hello.vi" but dialog's "OK" button stays greyed-out.)
    Cheers.
    Message Edited by tbd on 03-29-2007 03:15 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    VATStat.JPG ‏54 KB

    Hi Aristos,
          Thanks for the reply!  It was a bit dissappointing, though.
    It appears the LabVIEW-class object will be moving away from (what seems to me) a convenient object-interface presented by the invoke-node/method paradigm - which allows us to interface with a large set of "objects" (.NET, ActiveX, LabVIEW GUI, VISA Resource, ?) in a similar manner and independent of the object's origin.  Being able to read the methods and parameters that appear in these nodes is also helpful for understanding diagram logic!
    I do like the option of dropping a friendly "VI looking" icon on the diagram, but perhaps an optional - even default - VI-icon representation for a class-object invoke-node is feasible - so the LabVIEW class-object could be the more generic object first, but with a traditional-G representation(?)
    Given the answer "We would like, someday, to support the property node"
    and "in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future",
    ... I guess you'll break the wire in the next version, but (perhaps) allow it again - if support of the property node is ever implemented?
    Regards.
    P.S. For the record, huge THANKS to whoever it was that straightened-out enumerated-types (somewhere) between LV4.1 and LV6.1.  Every time I add or remove an enumeration in a typedef, I silently give thanks to the bright and thoughtful soul(s) who made this valuable tool work so well!
    Hello. This is your friendly neighborhood R&D guy for LabVIEW classes.
    Regarding your request about property and invoke nodes as relates to LV classes....
    Short story: We would like, someday, to support the property node. We have no intention of ever supporting the invoke node.
    Long story: As we were creating LV classes, we had to evaluate the right programming interface for these things. We wanted LV classes to behave as new data types in LV. A developer should be able to create a LV class, then give it to someone who doesn't even know OO programming, and that second programmer could use the new data type without learning a lot of new concepts. From this principle, we held fast to the idea that the programming interface should be subVI calls whereever possible. The invoke node is really nothing more than a VI minus the icon. If you want, you can popup on any subvi node and uncheck the option "View as Icon". This will make the node display in a way that has the terminals listed as text, like the invoke node. So, at the end of the day, the invoke node is simply a subroutine call in LV that is language dependent, as opposed to the language independent iconography of LV generally.
    The property node is a slightly different story -- the functionality of a property node is actually different than an invoke node as its terminals are various subsets of the properties available, not a fixed list of parameters like the invoke node. The property node provides a nice interface for setting multiple properties in a block and only having to check a single error return. Very friendly. Our intent is to allow you to create a VI that has 5 terminals: object in, object out, error in, error out, and either a single input or a single output of your chosen type. VIs with this conpane could be marked as "properties" of the class and would show up when you wire the class wire to the property node. We would call the subVIs behind the scenes as needed to get/set the properties.
    This is on the longer term roadmap because it is "syntactic sugar" -- it sweetens the programming style, but it is not necessary to program effectively. You can get the same effect by writing those same VIs and stringing them along on a block diagram "railroad track" style. We'll probably get around to it in three or four versions of LV -- there are some major user requests that impact functionality that have to get done first.
    PS -- in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future of people thinking there's a way to use these nodes.
    Message Edited by Aristos Queue on 04-02-2007 09:56 AM
    Message Edited by tbd on 04-03-2007 12:39 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Loading and viewing XML when a class object is created..Help Please

    Hello,
    I have writing a simple class which has a method that gets invoke when the object of the class is created. I am able to view the loaded XML content when I trace it with in my class method, but cannot assign the content to a instance variable using the mutator method. So the process goes like this:
    Class object is instantiated
    Class construtor then calls the loadXML method which laods the XML
    And then assigns the XML to a class instance variable.
    So now if I would like to access the loaded XML through class object, I should be able to see the loaded xml content which I am not able to see. I have spent over few hours and cannot get the class object to display the loaded XML content. I would highly appreciate it if someone can help in the right direction, please.
    [code]
    package com.as3.app
        import flash.display.*;
        import flash.events.*;
        import flash.text.*;
        import flash.net.*;
        public class Cars extends MovieClip {
               public var _CarList:Object;
               public function Quiz()
                  super();
                  loadCars();
    // ===========================================================
    //           CARS GETTER SETTER
    // ===========================================================
            public function set Cars(val:XML):void
                this._CarList = val;
            public function get Cars():XML
                return this._CarList;
    // ===========================================================
    //            LOAD QUESTIONS FROM XML
    // ===========================================================
            public function loadcars()
                var myXML:XML;
                var myLoader:URLLoader = new URLLoader();
                myLoader.load(new URLRequest("xml/cars.xml"));
                myLoader.addEventListener(Event.COMPLETE, processXML);
                function processXML(e:Event):void
                    myXML = new XML(e.target.data);  
                    Cars = myXML;                 // Assigning the loaded xml data via mutator method to the _CarList;
    //=============================================================  
                                  INSTANTIATING THE CLASS OBJECT
    //=============================================================
    package com.as3.app
        import flash.display.*;
        import flash.events.*;
        import flash.text.*;
        import flash.net.*;
        import com.as3.app.*;
        public class DocumentClass extends MovieClip {
            public var c:Car;
            public function DocumentClass()
                super();
                c = new Cars();  
                trace(c.Cars);
    [/code

    where you have:
                super();
                c = new Cars();  
                trace(c.Cars);
    c.Cars will not trace as the loaded xml, because it will not have loaded in time. After some time it should presumably have the correct value.
    loading operations in actionscript are asynchronous, so your nested function which is acting as the listener ( function processXML(e:Event):void) only ever executes when the raw xml data has loaded and that is (I believe, not 100% sure) always at least one frame subsequent to the current one.
    In general I would consider it bad practise to use nested functions like that, but I don't think its contributing to your issues here. I think its just a timing issue given how things work in flash....
    Additional observation:
    your Cars constructor calls loadCars() and your loadCars method is defined as:
    public function loadcars()
    I assume its just a typo in the forum that the uppercase is missing in the function name....

  • Safe to synchronize on Class object?

    Is it considered safe and good practice for a method to synchronize on the Class object of it's own class? I am using lazy initialization for a static field; the field is initialized to null when the class is loaded and then set to its actual value the first time it is used. I need to make sure the actual initialization is thread safe. Here is a simplified example of what I am doing.
    public class Test {
        private static String myField = null;
        public String foo() {
            synchronized (Test.class) {
                if (myField == null) {
                    myField = "Hello world!";
            return myField;
    }It seems like that should work, but I was a little worried that by locking the Class object I might cause a problem with the class loader or something.

    jschell wrote:
    Nick_Radov wrote:
    I have to use lazy initialization rather than initializing the static field in clinit because it's value depends on a superclass field which isn't fully available until the class loader finishes loading the class. So the lazy initialization is just to get around that sequencing problem.Huh? That is certainly phrased oddly at best. If a "superclass" is used then it is fully loaded before it is used. There is no sequencing problem with that.He might have a design problem. He can se a partly initialized super class if that method is overridden and invoked by the parent constructor.
    Kaj

  • Class object saving performce issue - (Workflow activity)

    Hi,
    I created a custom activity with a class object. If I call WorkflowDesigner.Save(filename) method, it takes a lot of time for saving class object.
    public class Abc: AsyncCodeActivity
            public Class1 Class1Obj
                get
                    return class1Obj;
                set
                    class1Obj= value;

    Hi,
    where are your external services located   If they are in the same assembly as the workflow (and this goes for custom activities as well), you can have all sorts of problems because you (well, VS) are constantly reloading assemblies and they can
    get out of synch.
    For more information, please refer to the discussion:
    https://social.msdn.microsoft.com/Forums/en-US/cce06d6f-4e7e-4294-9a14-d17e8addea45/workflow-designer-very-slow?forum=windowsworkflowfoundation
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Array of class objects

    I was wondering how would you declare an array of class objects. Here is my situation:
    I'm working on a project dealing with bank accounts. Each customer has a specific ID and a balance. I have to handle transactions for each customer at different times, so I was thinking that I need an array of class objects; however, I dont know how to initialize them.
    Here's what I did:
    BankAccount [ ] myAccount = new BankAccount[10];
    // 10 = 10 customers
    How do I initialize the objects?
    Thankz

    I was wondering how would you declare an array of
    class objects. Here is my situation:
    I'm working on a project dealing with bank accounts.
    Each customer has a specific ID and a balance. I have
    to handle transactions for each customer at different
    times, so I was thinking that I need an array of
    class objects; however, I dont know how to initialize
    them.
    Here's what I did:
    BankAccount [ ] myAccount = new BankAccount[10];
    // 10 = 10 customers
    How do I initialize the objects?
    Thankz
    HAI
    Use the hashtable
    and store the classObject of each customer with the corresponding Id in it
    and whenever u want to recover a class match the Id and get the corresponding class
    that is the best way to solve ur problem
    Regards
    kamal

  • How to pass class object  as in parameter in call to pl/sql procedure ?

    hi,
    i have to call pl/sql proecedure through java. In pl/sql procedure as "In" parameter i have created "user defined record type" and i am passing class object as "In" parameter in call to pl/sql procedure. but it is giving error.
    so, anyone can please tell me how i can pass class object as "In" parameter in call to pl/sql procedure ?
    its urgent ...
    pls help me...

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • Adding inner class object

    Hello to all
    I have one doubt regarding eventhandling. Consider i am having one class named outer which extends applet and with in outer class i am having one class inner which extends panel.
    Now when i try to add the inner class object in action performed of outer
    class it doesnt get added. How to overcome this.
    Eventhough sometimes it gets added it shouldnot appear for the first time. After resizing the window only it gets displayed.
    How to over come this.
    This is my coding
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JApplet implements ActionListener{
         JButton b1;
         Container c;
         public void init()
              c=getContentPane();
              b1=new JButton("First");
              c.add(b1,BorderLayout.NORTH);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              System.out.println("Working");
              c.add(new panel());
         class panel extends JPanel
              int a=5;
              JLabel l=new JLabel("ADSF");
              public panel()
                   add(new JButton("ASDFASDFs"));
                   add(l);
              /*public void paint(Graphics g)
                   g.drawString("ASDFASDF123123123123",20,20);
    }

    You could try being more specific when you add ie
    c.add(new panel(), BorderLayout.CENTER);

  • Front panel class objects are missing their icons in the runtime engine

    I have this project that contain some class objects. When run in the developer environment, the icons appear fine.
    However when I build as an executable and run it in the runtime engine, the icons are missing.
    These missing icons are purely cosmetic and the underlying logic works without a problem. Is there anyway to get these icons to display when built as an executable?

    Known issue, see http://lavag.org/topic/12980-class-control-icon-not-shown-in-run-time/
    EDIT: have you considered just making that control invisible?  Takes a bit of manipulation of property nodes and references but you can do it as shown:

  • Labview class objects

    In my lab we are working with a Photron Fastcam 512PCI. It is attached to a microscope and the image aquisition is run through LV. So far is has produced great results. However, there are some very time critical functions that need to be carried out at certain intervals in the VI. These functions are controlled with software provided by Photron, but we need LV to be able to access these functions. The software comes with an SDK with all the required DLLs. We have been attempting to use Call External Library nodes to access the required functions, but this is not working.
    From what I understand, the class definition in the DLL is a CCameraControl class. When the camera connects an object is created containing all of the camera parameters and functions. Using this, its member functions should be accessed by calling the constructor to create a class object for example called obj1. Then a function is called as such: obj1.GetManualTriggerPosition(position). Yet it does not appear that LV has integrated the concept of class. Is there any way to have LV call these functions?

    abriggs8 wrote:
    In my lab we are working with a Photron Fastcam 512PCI. It is attached to a microscope and the image aquisition is run through LV. So far is has produced great results. However, there are some very time critical functions that need to be carried out at certain intervals in the VI. These functions are controlled with software provided by Photron, but we need LV to be able to access these functions. The software comes with an SDK with all the required DLLs. We have been attempting to use Call External Library nodes to access the required functions, but this is not working.
    From what I understand, the class definition in the DLL is a CCameraControl class. When the camera connects an object is created containing all of the camera parameters and functions. Using this, its member functions should be accessed by calling the constructor to create a class object for example called obj1. Then a function is called as such: obj1.GetManualTriggerPosition(position). Yet it does not appear that LV has integrated the concept of class. Is there any way to have LV call these functions?
    Your best bet is to create an external wrapper DLL which translates the object oriented interface of your C++ DLL into a functional interface accessible by LabVIEWs Call Library Node. The reason LabVIEW doesn't have a direct Call Object Interface Node similar to the Call Library Node is because these interfaces are compiler dependant as far as the binary compatibility is concerned. So a C++ DLL created in Borland C is likely to be troublesome to be used in a Visual C application. In fact it is bascially impossible since the created link libraries are in different object format and can't be linked together anyhow.
    Another approach might be if your library exports its object oriented interface through Active X. Active X does among other things also norm the exact binary interface of an object and therefore allows LabVIEW to provide a common interface, which it has implemented since about version 5.1. I'm not a fan of Active X and never would recommend its use but if it is an option in your case you may try it out.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Regarding persistent classes  & objects

    Hi all,
    I am new to abap objects, please  give me some simple links of persistent classes & object.
    Let me know the difference between persistent classes & other simple classes..
    I ensure you for points!
    cheers.

    Hi,
    Transient and persistent data
    In principle, ABAP programs work with local program data, which resides in the program’s internal session. This data lives only as long as its context – that is, as long as its associated procedure (for local procedure data); its object (for attributes of classes); or its program (for global program data). This data is known as transient. Data that can be preserved beyond the runtime of the program is known as persistent. In SAP Systems, persistent data usually occurs as the content of database tables, but also as the content of files on application and presentation servers.
    To work with persistent data, the system has to load it into transient data objects belonging to the ABAP program while that program is being executed. Then, after processing has been completed, it stores the data in a persistent form again. During this time, the content of the data exists twice: once in the ABAP program (transiently), and once in the appropriate storage medium (persistently). A typical process would be reading data from a database table using the SELECT statement into a transient work area; modifying the work area; and then updating the database table (using UPDATE). In such cases, the contents of transient and persistent data are different in the interim during this process.
    Data in object-oriented programming
    In an ideal object-oriented application, data occurs only as the attributes of objects (if we ignore the local data in methods for the time being). Objects are an aggregation of functions (in methods) and data (in attributes). The description of an object – that is, the class – occurs persistently as a piece of source code, but its attributes exist only as long as the object. However, an object in ABAP Objects is transient in principle. It exists in the internal program session only from the time it is generated (using CREATE OBJECT) until it is deleted by the Garbage Collector. Therefore, to work with persistent data in objects, you must program access to where those objects are stored within the methods of the class.
    However, in completely object-oriented business application programming, then it is pointless simply to transfer the classical separation of data and functions to the methods – that is, to work with objects, but use procedural programming within the objects themselves. Ideally you could save the encapsulation of data and functions persistently within the object instead. A program could then leave an object in a certain state and a second program could continue working on the object in that state. Classes of objects are already persistent anyway, but you need some way of saving the attributes of an object persistently and then make reference to the appropriate class. The Persistence Service allows you to do exactly that.
    Persistent Classes
    To use the Persistence Service for objects, the classes of these objects must be created as persistent classes in the Class Builder. The term persistent class does not imply that a class is persistent. (As a template for objects, every class is persistent). Rather, it means that the objects of that class and their state are managed by the Persistence Service. For example, the objects of these classes are instantiated in the ABAP program with a method of the Persistence Service, which ensures that the initialization is correct (not with the usual CREATE OBJECT statement). When the Class Builder creates a persistent class, it automatically generates an associated class, known as the class actor or class agent, whose methods manage the objects of persistent classes. As well as their identity, persistent classes can contain key attributes, which allow the Persistence Service to ensure that the content of each persistent object is unique.
    Managed Objects
    The objects of persistent classes are managed by the Persistence Service. This means, among other things, that these objects are instantiated with a method of the class actor, not with the CREATE OBJECT statement. These objects are known as managed objects. Objects managed by the Persistence Service can be either persistent or transient.
    Persistent objects must be managed by the Persistence Service. The Persistence Service connects the object and the database.
    Transient objects of persistent classes are also managed by the Persistence Service. For example, the Persistence Service ensures that the object is unique within a program (by checking its key attributes), but not for a connection to the database.
    Plz refer to this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/f5/a3682ebc6911d4b2e80050dadfb92b/content.htm
    Thanks,
    Samantak.
    Rewards points for useful answers.

  • First class object in java

    What is a First class object in java?

    1. Shatabdi is a train that runs in India.
    2. First class is the only way to travel in indian
    trains. second snd third class, while cheap, means
    you ride in very uncomfortable conditions.
    3. paan is also known as betel nut. It is a bitter
    nut and green leaf that is chewed as some people find
    it refreshing. What results is copious amounts of
    saliva that is red. To get rid of the saliva, chewers
    of paan spit resulting in red stains wherever that
    saliva happens to land. It is a common site to see
    paan being sold on the railway platform by vendors and
    the attendant red stains on the walls at the ends of
    said platforms. Utterly gross.
    As for me being Indian? hmmm.....either that or yo be havin a lot of free time at your job at sisal plantation in deepest India.
    that way you get to travel a lot, mix with the people, get your impressions ....
    |:-)

  • Dealing with functions not in class Object

    Hi,
    while i was working on GJ i faced the following problem, when i write a generic class i have to take into my consideration those functions that i want to define for the row type class and not included in class Object (toSting() is in class Object but print() is not). of course every time i want to call print() from the generic class the compiler gives me an error becuz it is not in class Object.. is there anyway to get rid of this problem in a simple way without having to deal with more than one row type ?
    thanks everyone

    I think I see what you're getting at...the GJ compiler substitues Object for all unconstrained type parameters, and therefore tries to call methods on parametized type objects as if they were simply of type Object.
    A solution would be to create a base class (or interface) AbstractRow that declares all the methods you need. Then constrain your parameters against AbstractRow. Eg:
    public interface AbstractRow
    public AbstractRow rowMethod();
    public class MyClass<RowType extends AbstractRow>
    public RowType doSomething(RowType rt) {
    rt.rowMethod();
    I think that should work. I'm not sure what you meant by "without having to deal with more than one row type." If you meant "without having to introduce an inheritance hierarchy," then no, this is not possible in GJ (as far as I can tell). If you meant "without having to write adapters for every single row type," then yes.
    shaun

Maybe you are looking for

  • 9.2.0.6 to 9.2.0.8

    Dear all, How can I Upgrade my DB from 9.2.0.6 to 9.2.0.8.. am trying to download the patch from metalink.. but could'nt find any valuable downloads.. Any idea ? Yusuf

  • Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED

    Hi Experts,                       Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED . Thanks & Regards Bhaskar Rao.M

  • Will Acrobat Pro 9.5.5  work on Windows 7 Pro?

    Buying new laptop with Windows 7 Pro os; hopefully I can deactivate on old XP system and download and activate on Win 7 Pro?

  • CoreServicesUIAgent would like to access your calendar data

    Hi all, three days ago, I received a strange Mavericks pop-up: "CoreServicesUIAgent would like to access your calendar data". Then I went to the Security PrefPane, and saw CoreServicesUIAgent clicked. Strange, so I decided to unclick, although I chec

  • Image size issue when uploading to flickr

    Hi, I have a pro flickr account since a long time now. With iPhoto '09, i tried to upload some pictures to flickr. And as I want to keep them in the original size, i choose the right option in the dialog box in iPhoto during the 'export to flickr' pr