Xtend question - prepend to a list?

Hi all,

Probably a dumb question, but aren’t the Lists we use in rules normal Java List objects?

I ask because this:
val lines = test.split('\n').iterator lines.add(0,lastChanged)

fails with:
12:10:46.080 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'internal motion': An error occured during the script execution: The name '<XFeatureCallImplCustom>.add(<XNumberLiteralImpl>,<XFeatureCallImplCustom>)' cannot be resolved to an item or type.

Edit: never mind, I guess I misunderstood how the java interoperability behaves - this works:
val lastChanged = gInternalMotionSensors.allMembers.filter([motion|motion.state==ON]).head.name + " "+now val text = VAR_LastMotion.state.toString val lines = text.split('\n') val update = lastChanged + '\n'+lines.join('\n') postUpdate(VAR_LastMotion,update)