/** * Removes and returns the last object in the list. This also deletes the object from the * underlying Realm. * * <p>Using this method while iterating the list can result in a undefined behavior. Use {@link * io.realm.RealmResults.RealmResultsListIterator#removeLast()} instead. * * @throws IllegalStateException if the corresponding Realm is closed or in an incorrect thread. */ public void removeLast() { realm.checkIfValid(); TableOrView table = getTable(); table.removeLast(); }