public static boolean isPalindrome(long number) {
        long figureTarget = number;
        int figure = 0;
        while (figureTarget != 0) {
            figureTarget = figureTarget / 10;
            figure += 1;
        }

        for (int i = 0; i < figure / 2; i++) {
            if (getNumber(number, i) != getNumber(number, figure - 1 - i)) {
                return false;
            }
        }
        return true;
    }