Compare 2 objects - urgent

hi all
i have a problem.
I want to compare two objects but dono how.
Object obj1=null, obj2=null;
Vector vec = new Vector()
obj1=vec
Vector vec1=new Vector()
obj2=vec
now i want to compare if(obj1 == obj2)
how can i do this
help out plzzzzzzzzzzzzzzzzz
thanx

Nope, I'm still scratching my head over this one.
However, there are two comparisions in java.
==, and .equals() method
== just checks to see if the Object is the same Object
.equals() is defined to check if one Object is equal to another.
quick example:
  String s1 = new String("Hello");
  String s2 = s1;
  String s3 = new String("Hello");
  String s4 = new String("GoodBye");
  s1 == s2;  // true because they are the same object
  s1.equals(s2) // true because they have the same underlying value
  s1 == s3  // false because they are different objects
  s1.equals(s3) // true, because the are the same underlying value
  s1 == s3 // false
  s1.equals(s4)// also falseAny time you want to compare the VALUE of two objects, use the .equals method.
So in this case,
if (oldObj.equals(newObj)) is the way to go
If you are dealing with vectors/lists, the equals method will compare every item in oldObj with every item in newObj. If they are all equal, then it will return true.
Hope this helps,
evnafets

Similar Messages

  • I can't seem to get individual elements when comparing 2 arrays using Compare-Object

    My backup software keeps track of servers with issues using a 30 day rolling log, which it emails to me once a week in CSV format. What I want to do is create a master list of servers, then compare that master list against the new weekly lists to identify
    servers that are not in the master list, and vice versa. That way I know what servers are new problem and which ones are pre-existing and which ones dropped off the master list. At the bottom is the entire code for the project. I know it's a bit much
    but I want to provide all the information, hopefully making it easier for you to help me :)
    Right now the part I am working on is in the Compare-NewAgainstMaster function, beginning on line 93. After putting one more (fake) server in the master file, the output I get looks like this
    Total entries (arrMasterServers): 245
    Total entries (arrNewServers): 244
    Comparing new against master
    There are 1 differences.
    InputObject SideIndicator
    @{Agent= Virtual Server in vCenterServer; Backupse... <=
    What I am trying to get is just the name of the server, which should be $arrDifferent[0] or possibly $arrDifferent.Client. Once I have the name(s) of the servers that are different, then I can do stuff with that. So either I am not accessing the array
    right, building the array right, or using Compare-Object correctly.
    Thank you!
    Sample opening lines from the report
    " CommCells > myComCellServer (Reports) >"
    " myComCellServer -"
    " 30 day SLA"
    CommCell Details
    " Client"," Agent"," Instance"," Backupset"," Subclient"," Reason"," Last Job Id"," Last Job End"," Last Job Status"
    " myServerA"," vCenterServer"," VMware"," defaultBackupSet"," default"," No Job within SLA Period"," 496223"," Nov 17, 2014"," Killed"
    " myServerB"," Oracle Database"," myDataBase"," default"," default"," No Job within SLA Period"," 0"," N/A"," N/A"
    Entire script
    # things to add
    # what date was server entered in list
    # how many days has server been on list
    # add temp.status = pre-existing, new, removed from list
    # copy sla_master before making changes. Copy to archive folder, automate rolling 90 days?
    ## 20150114 Created script ##
    #declare global variables
    $global:arrNewServers = @()
    $global:arrMasterServers = @()
    $global:countNewServers = 1
    function Get-NewServers
    Param($path)
    Write-Host "Since we're skipping the 1st 6 lines, create test to check for opening lines of report from CommVault."
    write-host "If not original report, break out of script"
    Write-Host ""
    #skip 5 to include headers, 6 for no headers
    (Get-Content -path $path | Select-Object -Skip 6) | Set-Content $path
    $sourceNewServers = get-content -path $path
    $global:countNewServers = 1
    foreach ($line in $sourceNewServers)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0].Substring(2, $tempLine[0].Length-3)
    $temp.Agent = $tempLine[1].Substring(2, $tempLine[1].Length-3)
    $temp.Backupset = $tempLine[3].Substring(2, $tempLine[3].Length-3)
    $temp.Reason = $tempLine[5].Substring(2, $tempLine[5].Length-3)
    #write temp object to array
    $global:arrNewServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countNewServers ++
    Write-Host ""
    $exportYN = Read-Host "Do you want to export new servers to new master list?"
    $exportYN = $exportYN.ToUpper()
    if ($exportYN -eq "Y")
    $exportPath = Read-Host "Enter full path to export to"
    Write-Host "Exporting to $($exportPath)"
    foreach ($server in $arrNewServers)
    $newtext = $Server.Client + ", " + $Server.Agent + ", " + $Server.Backupset + ", " + $Server.Reason
    Add-Content -Path $exportPath -Value $newtext
    function Get-MasterServers
    Param($path)
    $sourceMaster = get-content -path $path
    $global:countMasterServers = 1
    foreach ($line in $sourceMaster)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0]
    $temp.Agent = $tempLine[1]
    $temp.Backupset = $tempLine[2]
    $temp.Reason = $tempLine[3]
    #write temp object to array
    $global:arrMasterServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countMasterServers ++
    function Compare-NewAgainstMaster
    Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    Write-Host "Total entries (arrNewServers): $($countNewServers)"
    Write-Host "Comparing new against master"
    #Compare-Object $arrMasterServers $arrNewServers
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Write-Host "There are $($arrDifferent.Count) differences."
    foreach ($item in $arrDifferent)
    $item
    ## BEGIN CODE ##
    cls
    $getMasterServersYN = Read-Host "Do you want to get master servers?"
    $getMasterServersYN = $getMasterServersYN.ToUpper()
    if ($getMasterServersYN -eq "Y")
    $filePathMaster = Read-Host "Enter full path and file name to master server list"
    $temp = Test-Path $filePathMaster
    if ($temp -eq $false)
    Read-Host "File not found ($($filePathMaster)), press any key to exit script"
    exit
    Get-MasterServers -path $filePathMaster
    $getNewServersYN = Read-Host "Do you want to get new servers?"
    $getNewServersYN = $getNewServersYN.ToUpper()
    if ($getNewServersYN -eq "Y")
    $filePathNewServers = Read-Host "Enter full path and file name to new server list"
    $temp = Test-Path $filePathNewServers
    if ($temp -eq $false)
    Read-Host "File not found ($($filePath)), press any key to exit script"
    exit
    Get-NewServers -path $filePathNewServers
    #$global:arrNewServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrNewServers): $($countNewServers)"
    #Write-Host ""
    #$global:arrMasterServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    #Write-Host ""
    Compare-NewAgainstMaster

    do not do this:
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Try this:
    $arrDifferent = Compare-Object $arrMasterServers $arrNewServers -PassThru
    ¯\_(ツ)_/¯
    This is what made the difference. I guess you don't have to declare arrDifferent as an array, it is automatically created as an array when Compare-Object runs and fills it with the results of the compare operation. I'll look at that "pass thru" option
    in a little more detail. Thank you very much!
    Yes - this is the way PowerShell works.  You do not need to write so much code once you understand what PS can and is doing.
    ¯\_(ツ)_/¯

  • COmparing object using console...

    Hi ,
    I want to compare the objects in between the two db schemas. I am using Oracle enterprise console. Here when i am click the compare objects for the tables, i got the below error.
    Cannot perform operation for product"Oracle Change Manager" because another operation is already in progress for the product,or a previous ooperation on the product failed..
    I am getting the above errr. I need to compare the objects now. So how can remove the old operation on the product failes ,
    I am fist time using this console in comparing schems.
    My oracle client is 10.2 cleint ..
    please help me out in comparing the objects ...

    hi:
    Whether did you understand your stub that input by IDL compiler?
    Because the stub extends the org.omg.CORBA.portable.ObjectImpl and provide method _orb() to get current local ORB reference. you do so and repeat your steps in your text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Convert String Object to Comparable Object

    Getting all types of warnings in Eclipse when I try to cast. I have a method that wants to accept a Comparable<Object> and I would like to pass in a string, float, or integer, and make sure of the Comparable interface.

    EJP wrote:
    Try Comparable<?>. If that doesn't work please post some code.I will continue this thread then.
    inserInSubTree() is to take an attribute and compare it to another using Comparable.
    Here is my code:
    private PrimaryIndexNode insertInSubtree(Comparable<?> newAttribute,
                                            int newByteIndex, PrimaryIndexNode subTreeRoot)
              if (subTreeRoot == null)
                   return new PrimaryIndexNode(newAttribute, newByteIndex, null, null);
              else if(newAttribute.compareTo(subTreeRoot.attribute) < 0)
                   subTreeRoot.leftLink = insertInSubtree(newAttribute,
                                                      newByteIndex, subTreeRoot.leftLink);
                   return subTreeRoot;
              else
                   subTreeRoot.rightLink = insertInSubtree(newAttribute,
                                                      newByteIndex, subTreeRoot.rightLink);
                   return subTreeRoot;
         }I am unfamiliar with generics or the proper use of Comparable. what I desire to do is compare any object for ordering it and subsequently inserting it into a binary tree. I figured Comparable could do this and with auto up and down boxing I can do this for primitives and objects.
    However, unfamiliarity with what I need to do and having no clear example in my resources has left me without remedy.

  • Help comparing objects

    Hi,
    My java app's purpose is to find out if I must update my simulated framework if the real framework has changed ( interfaces).
    My app loads two jar files ( real framework and simulated framwork) and use bcel to make an static analysis of the classes ( bcel created 'JavaClass' to describe the class).
    In order to determine if the classes are equal i create a 'DataClass' object with the following information:
    className
    Field [] fields (bcel 'Field' not java.lang.reflect.Field)
    Method [] methods (bcel 'Method' not java.lang.reflect.Method)
    I retrieve the information from JavaClass and put it in my 'DataClass'.
    This is the code I use to create a Vector for each framework ( Listing 1). This is where I store the data describing my classes in the api (Listing 2). Then I compare each 'DataClass' contained in the Vector.
    My intention is to compare the 'data' of the 'DataClass'. But since I get that all DataClass objects are NOT equal I guess I compare references. How can I do this.
    All hints are vey much welcome.
    cheers,
    //mikael
    Listing 1
    ==========
    Note: ClassSet is a 'Set' of JavaClass' objects.
    public static Vector makeDataObjects(ClassSet classes){
            Vector api = new Vector();
            JavaClass [] clazzes = classes.toArray();
            for (int i = 0; i < clazzes.length; i++) {
             JavaClass clazz = clazzes;
    DataClass dc = new DataClass();
    dc.setClassName(clazz.getClassName());
    Field [] fields = clazz.getFields();
    for(int j = 0; j < fields.length; j++){
    dc.setField(fields[j].toString());
    Method [] methods = clazz.getMethods();
    for (int k = 0; k < methods.length; k++) {
    dc.setMethod(methods[k].toString());
    api.add(dc);
    return api;
    Listing 2
    =========
    import java.util.ArrayList;
    public class DataClass implements Comparable{
        private String className = null;
        private ArrayList fields = new ArrayList();
        private ArrayList  methods = new ArrayList();
        public void setClassName(String className){
            this.className = className;
        public String getClassName(){
            return className;
        public void setField(String field){
            fields.add(field);
        public void setMethod(String method){
            methods.add(method);
        public int compareTo(Object o){
    }This is where I compare the content of my two api:s
    Listing 3
    =========
    public static void compare(Vector api1, Vector api2) {
    for (Iterator iter = api1.iterator(); iter.hasNext();) {
       DataClass clazz1 = (DataClass) iter.next();
       String className = (String) clazz1.getClassName();
       DataClass clazz2 = (DataClass) toBeCompared(className, api2);
       // compare object values
       System.out.println("clazz1 is " + clazz1.toString());
       System.out.println("clazz2 is " + clazz2.toString());
       if (clazz1.equals(clazz2)) {
        System.out.println("Objects are the SAME" + className);
       } else {
        System.out.println("Objects are NOT the same" + className);
    private static DataClass toBeCompared(String className, Vector api){
      DataClass dao = null;
      for (Iterator iter = api.iterator(); iter.hasNext();) {
        DataClass element = (DataClass) iter.next();
        String otherClassName = element.getClassName();
        if (className.equals(otherClassName)){
        dao = element;
    return dao;

    Your error is that you implement Comparable and the compareTo method instead of the equals method of Object class. Comparable is needed for ordering items. Equals instead is used to check if two objects are equal. Per convinience it is expected that there is no inconsistency if both equals and compateTo are implemented.
    So you should implement a method in DataClass:
    public boolean equals(Obejct o) {
      boolean result = false;
      if (o instanceof DataClass) {
        DataClass c = (DataClass) o;
        result = className.equals(c.className) &&
             fields.equals(c.fields) &&
             methods.equals(c.methods);
        // keep in mind here, that the arrays fields and
        // methods should be sorted / ordered. use Collections.sort(fields)
        // for this when you create or modify it
      return result;
    }You could also simplify the compare(Vector api1, Vector api2) method when you keep these Vectors sorted for className or use Set (what i dont recommand because of properbly performance drawbacks):
    public static void compare(Vector api1, Vector api2) {
      Collections.sort(api1, new ClassNameComparator());
      Collections.sort(api2, new ClassNameComparator());
      // you should possibly dont do this sorting here because the
      // method name does not state that the vectors are modified
      // but it's a precondition for make the following work properly:
      return api1.equals(api2);
    }i did not compile the code, so i hope i did not make many errors.
    regards
    Sven

  • Someone please help creating comparable objects

    I have been given a second part to an assignement that wants me to create a program for comparing student obejects. The assignment description and code are below. I can' t see how the find to method interlocks with the findsmallest because find smallest is already finding the smallest value. I also don't see where the new diffinitions for UMUC_Comparable goes.
    In the second part of this project, you will also find the smallest element in the array, but now the array will be of UMUC_Comparable objects. It will use the compareTo method to compare objects to find the smallest one. This method will also have the name findSmallest, but will take an array of UMUC_Comparable objects. This findSmallest method will have a definition as follows:
    UMUC_Comparable findSmallest(UMUC_Comparable[] array);
    The findSmallest method will use the compareTo method in the UMUC_Comparable interface. You will be using it with the Student objects from module V, section III, so you do not have to rewrite the compareTo method; you can simply use the one defined in the Student object in module V.
    For the second part of this project, you should:
    Create a main that creates an array of Student objects, as in section III of module V. You can use the same array as defined module V. You do not have to read these objects in from a file.
    Call the findSmallest method to find the smallest Student object.
    Use the getName and getAverage methods in the Student object to print out the smallest object.
    Note that the return from the method is a UMUC_Comparable object, not a Student object, so you must cast the returned object to a Student object before printing it out. You can do so as follows:
    Student[] students ....; // Fill in the declaration // of the student array.
    Student s = (Student)findSmallest(UMUC_Comparable[] array);
    /* File: Student.java
    * Author: Darrell Clark
    * Date: December 3, 2006
    * Purpose: Shows how to find the smallest Int value in an array
    import java.util.*;
    import java.io.*;
    public class Student {
    private int average;
    private String name;
    /* public constructor. Note that because no default
    * constructor exists, Student objects will always
    * be constructed with a name and an average.
    public Student(String name, int average) {
    this.average = average;
    this.name = name;
    } // end method
    * return name
    public String getName() {
    return name;
    } // end method
    * return average
    public int getAverage() {
    return average;
    } // end method
    * compare to method for locating smallest value
         public static int findSmallest(int[] array) {
              int min = Integer.MAX_VALUE;
              for (int i = 1; i < (array.length); i++) {
                   if (array[i] < min)
                        min = array;
              return min;
    * compare student value
    public int compareTo(Student student) {
    return (this.average - student.average);
    } // end method
         public static void main(String[] args) {
    Student[] studentArray = { new Student("Tom", 87),
    new Student("Cindy", 100),
    new Student("Pat", 75),
    new Student("Anne", 92),
    new Student("Matt", 82)};
    for (int i = 0; i < studentArray.length; i++) {
    System.out.println(studentArray[i].name + " " +
    studentArray[i].average);
    } // end for
    } // end method
    } // end class

    Were you given the UMUC_Comparable interface, or do you have to write it?
    (1) In the latter case, that is where to start. It includes the method
    compareTo(UMUC_Comparable). This will almost certainly return an
    int - check out the API documentatuon for the Comparable interface.
    (2) What I think the assignment is asking you to do is rewrite the Student
    class so that it implements UMUC_Comparable.
    Then you write the findSmallest(UMUC_Comparable[]) method. There is
    already a static method like this in the (existing) Student class. It's anybody's
    guess where this method is supposed to go - perhaps you could ask
    whoever gave you the assignment. The problem is that it can't go in
    UMUC_Comparable because that's an interface. And it doesn't really belong
    in Student because it is a sort of utility function that deals with any
    UNUC_Comparable array.
    (3) Let's assume that findSmallest(UMUC_Comparable[]) goes in the
    Student class. So you replace the existing findSmallest() with the new one.
    The new one goes through the array using the UMUC_Comparable's
    compareTo() method to find the smallest UMUC_Comparable.
    (4) Finally in main() you create a test array, use the newly rewritten
    findSmallest() to find the smallest Student, and print their name and
    average.

  • Comparing objects from system other  system

    Hi,
    I need to compare the multiprovider from development system to production system.Is there is any program  avilable to compare objects. Please share.
    Thanks,
    vikk

    Hi Vikk,
    The important thing for multiprovider is characteristics and key figures identification.
    Use table RSDICMULTIIOBJ for getting the complete list of infoobjects having identification in multiprovider. Now you can either download the complete mapping in two excel sheet and then do the comparison using some vlookup technique.
    Or You can simply do the online comparison over development and production system.
    Regards,
    Durgesh.

  • Comparing objects for equality with UDT's

    Hi.
    I was wondering how Oracle does comparison for equality of objects that contains parameters of user defined types.
    Suppose I have an object with a parameters whose types are:
    1) number,
    2) varchar2,
    3) nested table type,
    4) associative array
    and I want to compare two such objects for equality. Would Oracle compare all parameters of this 2 compared objects field-by-field (and dig recursive to "leafs"), or would it compare only 1), 2) and doas nothing with 3) and 4)?
    Must I declare an order method for such comparison?

    You didn't specify a version - this is correct for 10.2, I'm not sure if it has changed in 11g.
    By default it will compare for exact equality - i.e that every attribute is the same. You can also only do it in SQL, not PL/SQL. Also can only do = and <> - you cannot do < or > etc.
    You need to create a MAP or ORDER method on the type to do any more sophisticated comparison (Same as in most object oriented languages). Documentation is here http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14260/adobjbas.htm#sthref211

  • Help with adding a progress bar to my compare-object script

    I have a simple compare object script that I would like to add some kind of intelligent progress bar or countdown timer to.  The script takes anywhere from 1-12 hours to run depending on the folder sizes.  Here is the script:
    $internal = Get-ChildItem -Recurse -path C:\Folder1
    $external = Get-ChildItem -Recurse -path C:\Folder2
    Compare-Object -ReferenceObject $internal -DifferenceObject $external | Out-File C:\compare_list.txt
    I have a progress bar script that I found but I do not know how to implement it into my existing script.  Here it is:
    for ($i = 1; $i -le 100; $i++) {Write-Progress -Activity 'counting' -Status "
    $i percent" -PercentComplete $i ; sleep -Milliseconds 20}
    Any help is much appreciated.

    Hi Brisketx,
    In addition, to add a Progress Bar to Your PowerShell Script, this article may be helpful for you:
    Add a Progress Bar to Your PowerShell Script:
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/29/add-a-progress-bar-to-your-powershell-script.aspx
    I hope this helps.
    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.

  • Directly access specified item in Compare-object results

    I have done a Compare-Object and assigned the results to the array variable $NeedToConform. I can iterate through the variable with foreach ($Item in $NeedToConform) and get $Item.SideIndicator, but in my case I already have the item in question in $Package,
    and I need to get at the SideIndicator of that specific item. Basically $NeedToConform.$Package.SideIndicator, but that doesn't work. I tried using a dictionary instead of an array, with no joy. 
    Is there a trick here, or should I just punt and step through the array each time?
    EDIT: Damn, why do I so often find a solution right after posting the question. And why don't I learn and post the question sooner, so I'll find the solution sooner? ;) Anyway, this works.
    if ($NeedToConform[[array]::indexof($NeedToConform,$Package)].SideIndicator -eq '<=')
    I just wonder, is indexof really just a convenience method that iterates for me? If I might have a hundred or more results in the $NeedToConform array, and I might need to test against a hundred values for $Package, do I have any performance implications
    to worry about?
    Gordon

    mjolinor,
    my failure with Dictionary was on multiple fronts.
    One, you need to compare two dictionaries. But one of my objects needs to be ordered, and it needs to work in v2, so an ordered dictionary isn't an option. I may have been able to get it to work, but indexof works with the array, so that is my solution for
    now. But I am flagging this to come back to for review down the road. Always something new to learn.
    Thanks!
    Gordon
    You can have an ordered dictionary in V2:
    $OrderedHT = New-Object collections.specialized.ordereddictionary
    You just didn't see it used very often because you couldn't use it to create an object very easily.  The -properties parameter of New-Object would only take a generic/unordered dictionary as an argument.
    They fixed that in V3, along with adding the type accelerator ([ordered]) to make it easier to create an ordered dictionary.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Web Services with Complex Objects (Urgent !!)

    Hi,
    My last post was on a problem using IBM-RAD (Service) and AXIS2 (Client) in "New to Java" Forum. That is one of the trial scenarios I'm working on nowadays. Hope, I'll get some useful reply soon.
    Now, I need a suggestion about the application I'm working upon. It is as follows:
    (i) The application (i.e. Service Class) takes some primitive,String and/or some bean object as input
    (ii) It returns a bean object [or an array (can use collection class also if possible) of bean objects].
    (iii) The bean properties are primitive,String , other bean objects, and/or some collection object(Vector / ArrayList etc.) i.e. it should handle complex objects.
    (iv) The Service should run on Websphere and Client on Tomcat.
    A pictorial representation is given below:
    [primitive/String/bean object (Input arg)]
    [(Contains  primitive/String/other bean objects/collection class)] Bean <---------> Service <----------------------- Client
    [Calls bean] |===============> Client
    [Returns bean (or array of beans / collection object)]
    I'm now trying (by building test applications) a combination of IBM-RAD (Service) and AXIS2 (Client), but facing problems in handling array of beans and/or collection classes either on Service or on the Client side.
    So, I need some suggestions on whether I'm going the right way, or need to change my approach (or technology). Any suggestion would be appreciated.
    Please reply ASAP, it is urgent.
    Thanks in advance,
    Suman

    no problem for me, so it's not urgent.
    Request for help denied.

  • How to compare objects between systems

    Hi,
    At the moment I am busy activating business content in BW for an SAP IS-U project. Here I encounter the following problem:
    In the past others have been activating business content objects and they have assigned a developer class to it. Then they decided they did not need those objects and they deleted their transports.
    Now when I want to transport objects to the acceptance environment quite often transports fail due to missing objects (which have never been transported). The automated activation does not include these dependent objects, as it thinks they are already available.
    Is there a way to compare two systems to see which objects are missing and need transporting (without sifting through each InfoObject/transfer rule etc by hand to check its existence)?
    Preferrably I would like to know table names so I can compare SE16 lists, but other suggestions are also more than welcome.
    Otherwise an easy way to see the technical names of those objects so that I can add them manually to a transport request?
    Thank you very much,
    Crispian

    Hi Crispian,
    Welcome to SDN!!
    You can use the following tables for comparing:
    RSDIOBJ - For info-objects
    RSDCUBE - For Cubes
    RSDAREA - InfoAreas
    RSDCHA - Characteristic Catalog
    RSDCUBEIOBJ - Objects per InfoCube (where-used list)
    RSDIOBC - InfoObject catalogs
    RSDIOBCIOBJ - InfoObjects in InfoObject catalogs
    RSDKYF - Key figures
    RSIS - InfoSource (transaction data)
    RSTSRULES - Transfer structure transfer rules
    RSDODSO - ODS
    Hope this helps.
    Bye
    Dinesh
    <i>Assigning point to the helpful answers is the way of saying thanks in SDN. you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>
    Message was edited by: Dinesh Lalchand

  • Comparing objects

    Hi everyone, I'm new with java and I need some help.
    When you create a method that compares two objects and it's arguments are of a type of another class, do you have to do some sort of casting if you get a incompatible type error? Is it even possible to cast a String into a another class or vice versa. Heres the code I have so far
    class Object{
      String Object;
    public class Equals  {
    public static Object object(Object zero1, Object zero2) {
         zero1 = "hello";       
            zero2 = str1;
            System.out.println("Same object? " + (zero1 == zero2));
    }The error I get is at
    zero 1 = "hello";
    ^
    It says it found a String but was looking for Object
    Thanks for any help!

    This code
    public static Object object(Object zero1, Object zero2) {     
         zero1 = "hello";       
            zero2 = str1;
            System.out.println("Same object? " + (zero1 == zero2));Makes about zero sense.
    You get some parameters and immediately re-assign them. Not promising. You then seem to be making the very common rookie error of trying to compare for equality using == instead of the equals method.
    Please review the basic Java tutorial found [_here_|http://java.sun.com/docs/books/tutorial/java/index.html] That indicates you're missing some basic fundamentals.

  • Please help...stuck with compareTo when comparing objects in ListNodes

    I'm writing a SortedLinkedList class that extends MyLinkedList that I wrote and I need to write a sort but i keep getting this error message when I try to compare two objects in the listnodes
    cannot resolve symbol method compareTo(java.lang.Object)
         Object a = get(x); //get returns an object at the listnode x(index)
         Object b = get(y);
    if(a.compareTo(b) >= 0) //Error message
    etc.....

    If you want to sort the list nodes, you can make a
    compareTo method for each node which casts its Object
    to a Comparable and calls compareTo on the arg's (arg
    is the other list node) Object.     would i put this in MySortedLinkedList class?
    public int compareTo(Object o)
              return this.compareTo((Object)o).this);
              //this is the best i can come up with so far but it doesn't help me at all

  • Comparing Objects binary search tree

    I want to create a generic binary search tree whose nodes accept Objects as data is there any generic way of passing a comparison to my bst class for my insertion routine.
    is it possible to pass the type of the Object say I pass an Integer to my Node is there some way to pass the type as well so I can cast to it in my tree and do a comparison.
    Thanks for any help you can provide.

    I don't like that idea.
    I think you're better off taking a java.util.Comparator and letting that handle class-specific comparisons.

Maybe you are looking for

  • Why do you need to format an external back up drive for os extended?

    help

  • Solution Manager Key info

    Hi Guru's, As we are planning to migrate / system copy all systems like SAP Portal , BI & XI to a new hardware, from P5-P590 to P6-P570 (The OS version, TL level and Patch Level for the both LPAR's remains same, i.e  No change on OS versions). My que

  • Wanting to write a SOAP server.

    I'm a Java programmer of 8 years experience, worked in J2EE, good knowledge of the usual XML APIs, the HTTP protocol etc, just so we know where we're starting... I'd like to write a SOAP server to expose certain routines to a Java client. Obviously I

  • Where can i see my itunes credit?

    Hi, i look for my itunes credit, i have ios 7 and cant find the credit. Thanks for help

  • Whatsapp losing chat history

    Hi, I have been chatting in a whatsapp group chat for several months now. But recently, in the past week, I keep on losing part of the chat history from the group but the single one-on-one chat remains intact. So here's an example: Chat from 13:00 ti