What is the use of passing object reference to itself ?

What is the use of passing object reference to itself ?
regards,
namanc

There is an use for returning an object reference from itself, for instance:
class C {
public:
     C append(C c) {
         // do something interesting here, and then:
         return this;
}You can "chain" calls, like this:
C c = new C();
C d = new C();
C e = new C();
c.append (d).append (e);Maybe the OP has "inverted" the common usage, or thought about a static method of a class C that requires a parameter of type C (effectively being a sort of "non-static method").
class C {
    static void doAnotherThing (C c) {
        c.doSomething(); //-- effectively C.doAnotherThing(c) is an "alternative syntax" for c.doSomething()

Similar Messages

  • What is the use of Adapter objects in I.R

    what is the use of Adapter objects in I.R

    congratulations you successfully opened 1000 new threads...
    adapters are components of the adapter engine, their main action is to connect different sysems with each other. therefore are different adapters:
    SAP-2-SAP Adapters: like IDoc and RFC
    SAP-2-NOT-SAP-ADapters: like JMS, JDBC, HTTP..
    and B2B Adapters...
    there are some rules in any board that you should accept:
    use search first
    use the sap help http://help.sap.com/
    and read the forum rules
    regards cc

  • What is the use of passing String[] args in main() method?

    what is the use of passing String[] args in main() method?
    Is there any specific use for this ?

    actually my sir asked me the same question & I gave
    the same reply as given by you........but he further
    asked what is the use of this also??
    ie accepting cmd line args at runtime??is there any
    specific purpose ??Apart from the one you just mentioned? No

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • What is the use of mutable Objects ?

    Hi all,
    I want to know the use of mutable objects?
    Could u please help me ?
    regards,
    Nalini

    public class Sum {
        double value;
        public void add(double d) {
            value += d;
    }The sum class is mutable, since you can change it's value. The Integer class is an example of a class that's immutable. You can't change the value of an Integer after you have constructed the object.
    /Kaj

  • What is the Use of Imported Archives in Mapping Objects

    Hi All,
    What is the Use of Imported Archives in Mapping Objects ( IR )
    Regards
    Vamsi

    Hi Vamsi,
    When we are doing JAVA , XSLT mappings we have to do import archievs
    after developing the JAva mapping in NWDS and create jar file come back to IR under imported archieves we will import the jar file.
    Similarly XSLT als make the zip and import under imported archieves
    Also when we have any java packages ,import it under archieves and make them to use in UDF
    See the below links
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fxi%2fxi-design_configuration%2ffileValidationsinSAPXI-ACaseStudy.pdf
    Check this thread...
    Reusability of User-defined Functions
    Check this thread...
    Re: User-defined function in multiple Message Mappings
    Using external JARs in Web Dynpro Dev.Component
    see sap documentation:
    http://help.sap.com/saphelp_nw04s/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    Cheers...
    Vasu
    <b>** REward POints if found useful **</b>

  • What is the use of services for object icon (attachment) in customer master

    Hello,
    What is the use of the icon in customer master i.e. service for object(attchment)
    Any idea In which table those attachemnts stores,
    In SAP i can see only temp. structure table SGOS_ATTA when i look for table information, so i dont know where to look for these files although i tried great selection of tables which either were empty
    Thnks,
    Ahamad S

    Please search the forum or Google with the same text so that you will find many times this has been discussed.  Please go through the forum rules which you can see to your right screen and adhere to that.  Being an old member, no need to stress this.
    G. Lakshmipathi

  • What is the use of setting null values to Objects?

    What is the use of setting null values to Objects?
    regards,
    namanc

    It's more of a safety trap within java to handle the "programmers are still humans" exception.
    String myname;
    // print what???? Forgot to initialize the name!
    System.out.println(myname);Java will complain about myname not being initialized. It won't when you do this:
    String myname = null;
    // allright, your name is null
    System.out.println(myname);In the second case you are showing to java that you know what you are doing.

  • What is the use of an access object in a BOL hierarchy ????

    Hi All,
         I want to know what is the use of an access object in BOL hierarchy .... if we can use a search object to search for entities ... then in what scenario will an access object be used ?
    Regards,
    Ashish

    Hi Dominik,
            Thanks for the repy !!!!
    Now, as you said we can access a (deep) node of the whole model using an access object.
    Let us consider the component set ONEORDER. As seen we can use the following path to reach BTDocFlowAll using search object :-
    BTQuery1O -> BTOrder  -> BTOrderHeader  -> BTHeaderDocFlowSet -> BTDocFlowSet -> BTDocFlowAll ....
    Also, to reach BTDocFlowAll we can even use the access object as follows :-
    BTAdminI -> BTItemDocFlowSet  -> BTDocFlowAll....
    Now my question is :-
    Normally we use the class cl_crm_bol_query_service to fire a search based on a search object. Can we use the same class to fire a search based on access object ?
    (actually I currently dont have a CRM system so I could not try it out myself).
    If not, then how do we fire a query using an access object ?
    Regards,
    Ashish

  • What is the use of various text objects in text determination

    Dear All,
    What is the use of various text objects in text determination.e.g the sale document header object(In this what we define and where that text is copied further) and
    other text objects i.e customer/accounting,billing header etc.
    Regards,
    Ashima

    Hi,
    To exchange information between the User and the System    as well as between the objects (Ex: Customer to Sales document, Sales document to Delivery Document) SAP uses Text Determination to determine or to propose Text. Text can be determined for objects like customer master, all documents, condition records, customer material info records, etc...
    hope it helps..
    regards..
    yogi..

  • What is the use Business objects over WAD.

    Hi Folks,
    what is the use Business objects over WAD.
    How sap bw is going to use Business Objects.
    Thanks,
    Cheta.

    hi,
    A business object is a master record within the Measurement System, and is defined as part of the measurement class within Customizing.
    Examples of business objects are wells, well completions, and measurement points.
    Once the measurement object is maintained, it is saved with the business object so that when viewed, the measurement object is part of the business object.
    regards,
    Siddharth.

  • A simple teststand applicatio​n passing object reference to C#

    Hi,
     I have a  .NET application written in C# which has a UI with  NationalInstruments.TestStand.Interop.UI.Ax.AxExpressionEdit controls. This UI is invoked by a custom step in TestStand. One of the values, entered by user in the UI is a object reference variable created in a previous step. I need to store the values entered in the UI during the edit mode of the step, into the TestStand Step variables. And during the run mode i use these values to execute the logic in C#. 
    The problem is during edit time, the object reference variable, entered in the UI, has no value. It is null. So there is no use storing it at edit time. During the runtime i am trying to retrieve the value of the object reference variable using GetValInterface(...) and GetValIDispatch(..) methods of PropertyObject. But the object returned to C# is of type System.__COMObject wherease in TestStand that object reference is of type .NET.
    I don't know how a .NET object reference is converted to COM object when it is returned to .Net function.
    Also is there any other method to send this object reference variable's (whose value is '.NET' in previous step itself) value to .NET as a .NET object only so that i can typecast to appropriate type and start using.
    Thanks.
    Please let me know if anything is not clear.
    I have attached the .Net project, .ini file for the custom step and a example sequence file.
    Attachments:
    CCustomStepObj.zip ‏23 KB

    Hello Shivapriya,
    The example you've sent doesn't compile. And it without it I'm affraid I do not understand the problem you're describing.
    You've given references to libraries that you've not attached with your files.
    For the C# I see these are the
    IADCore.dll
    InstrimentInterfaces.dll
    TestStand also seems to want to reach for the assembly named TestSystem.dll.
    I can only tell you that I have used successfully in the past the Variables in TestStand to hold .NET object references, and call methods on them and I experienced nothing similar that you describe, but I don't quite follow what is the problem here, as I can't use the example. 
    I would appriciate if you cold narrow down the example to 1 dll or something where the problem occurs and than resend it.
    Regards,
    Maciej 
    Message Edited by Mac671 on 09-28-2009 02:59 AM

  • What is the use of REUSE_ALV_FIELDCATALOG_MERGE

    Hi
    in alv's what is the use of REUSE_ALV_FIELDCATALOG_MERGE OTHER THAN ADDING FIELD HEADINGS
    Title Edited by: Alvaro Tejada Galindo on Jan 11, 2008 4:20 PM

    Hi,
    This is the functionality of that FM,
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o   Performance is affected since the code of the table definition must
        always be read and interpreted at runtime.
    o   Dictionary references are only considered if the keywords LIKE or
        INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    reward points if useful,
    seshu.

  • What is the use of Generic class in java

    hi everyone,
    i want to know that
    what is the use of Generic class in java ?
    regards,
    dhruvang

    Simplistically...
    A method is a block of code that makes some Objects in the block of code abstract (those abstract Objects are the parameters of the method). This allows us to reuse the method passing in different Objects (arguments) each time.
    In a similar way, Generics allows us to take a Class and make some of the types in the class abstract. (These types are the type parameters of the class). This allows us to reuse the class, passing in different types each time we use it.
    We write type parameters (when we declare) and type arguments (when we use) inside < >.
    For example the List class has a Type Parameter which makes the type of the things in the list become abstract.
    A List<String> is a list of Strings, it has a method "void add(String)" and a method "String get(int)".
    A List<File> is a list of Files, it has a method "void add(File)" and a method "File get(int)".
    List is just one class (interface actually but don't worry about that), but we can specify different type arguments which means the methods use this abstract type rather than a fixed concrete type in their declarations.
    Why?
    You spend a little more effort describing your types (List<String> instead of just List), and as a benefit, you, and anyone else who reads your code, and the compiler (which also reads your code) know more accurately the types of things. Because more detail is known, the compiler is able to tell you when you screw up (as opposed to finding out at runtime). And people understand your code better.
    Once you get used to them, its a bit like the difference between black and white TV, and colour TV. When you see code that doesn't specify the type parameters, you just get the feeling that you are missing out on something. When I see an API with List as a return type or argument type, I think "List of what?". When I see List<String>, I know much more about that parameter or return type.
    Bruce

  • What is the use of read_text in scripts?

    hi
    what is the use of read_text in scripts?

    HI,
    in genral read_text FM is used to display the Text maintained in standardtransactions like ME21n/ va01 ,,, if u wanna display this text, u shud use READ_TEXT by passing th erelavnt parametsr like object, id, text, lang.
    in case o f scripts, there is no need to call this FM, when u r including the standard text using menu--include -standard text, here u shud give the object, id, text, lang..(this is simialr to standard text) then script will display the text mainatined in the standard transactions.
    Regards,
    Naveen

Maybe you are looking for

  • "Error reading credit master data"  in contract management in CRM 7.0

    Hi All, In CRM 2007,whenever we navigate to contract management screen,error message come which is "Error reading credit master data " Any suggestion on how to solve this issue. Regrads Nikhil

  • Query help to get Matrix report

    Hi All, I have posted this query in Reports forum, didnt get replies, so im posting at Database general may be it could be the query problem. Account Main Heads Account_main_head_code, Main_head_description 01 ADMINSTRATIVE 02 OPERATIONAL Ledger_code

  • Problem adding CSA external interface in IPS 6

    I configured my AIP-SSM sensor running IPS 6 to connect to the CSA MC, but I get a connection failure. The sensor is showing the following error when trying to connect: evError: eventId=1168311248090659938 severity=warning vendor=Cisco originator: ho

  • ORA-07445 encountered in database

    Dear all My database is Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production and platform is HP-UX. I got the following error in the database: ORA-07445: exception encountered: core dump [ksusrs()+81] [SIGSEGV] [Invalid permis

  • Naming conventions/hierarchies for products and software components

    Hi, Can someone please advise what they have found works well for naming products and software components and recommended hierarchies? Following the SAP model it seems to make sense to have a custom product for each SAP product when we are developing