class ElementProperties {

    public static ElementProperty isWithIndex(Integer index) {
        return new ElementProperty() {
            @Override
            public String toXpath() {
                return String.format("position() = %d", index + 1);
            }

            public String toString() {
                return "with index " + index;
            }
        };
    }

    private  ElementProperties();

}