app/src/main/java/org/andstatus/app/account/MyAccounts.java
/** My account, which can be used to sync the "other" actor's data and to interact with that actor */
My account, which can be used to sync the "other" actor's data and to interact with that actor
My account which can be used to sync the " other " actor ' s data and to interact with that actor
@NonNull
    public MyAccount toSyncThatActor(@NonNull Actor other) {
        return other.isEmpty() ? MyAccount.EMPTY
                : Stream.of(fromActor(other, true, true))
                .filter(MyAccount::isValid).findFirst()
                .orElseGet(() -> forRelatedActor(other, true, true)
                                .orElseGet(() -> other.origin.isEmpty()
                                        ? MyAccount.EMPTY
                                        : getFirstPreferablySucceededForOrigin(other.origin))
                );
    }
@ NonNull public MyAccount toSyncThatActor ( @ NonNull Actor other ) { return other . isEmpty ( ) ? MyAccount . EMPTY : Stream . of ( fromActor ( other , true , true ) ) . filter ( MyAccount :: isValid ) . findFirst ( ) . orElseGet ( ( ) -> forRelatedActor ( other , true , true ) . orElseGet ( ( ) -> other . origin . isEmpty ( ) ? MyAccount . EMPTY : getFirstPreferablySucceededForOrigin ( other . origin ) ) ) ; }
My account, which can be used to sync the "other" actor's data and to interact with that actor
My account which can be used to sync the " other " actor ' s data and to interact with that actor