The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

[SOLVED]EntrySet is not supported by Example

wujiangwujiang Member Posts: 12 Contributor II
edited November 2018 in Help
Hi there

I have a project for add a operator to RM, Recently, I use the iterator for deal with 'example'. like:

 


public Reader(Example example) {
this.example = example.entrySet().iterator();
}
but once I execute my operator, a report of bug will be shown:

SEVERE: Process failed: operator cannot be executed (EntrySet is not supported by Example.). Check the log messages...
java.lang.UnsupportedOperationException: EntrySet is not supported by Example.

but, example is a type of Map<String, Object> ?

Could you help me?

Thanks a lot.

Jiang
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    as you can see in the Example.java class, not every operation from the parent class is supported. You can iterate over all values from an example via

    for (Attribute att : example.getAttributes()) {
        System.out.println(example.getValue(att));
    }
    Regards,
    Marco
  • wujiangwujiang Member Posts: 12 Contributor II
    OK, Got it, Thank you very much! ;D
Sign In or Register to comment.