class BasicPathSegment implements Path.Segment {

    @Override
    public boolean equals( Object obj ) {
        if (obj == this) return true;
        if (obj instanceof Path.Segment) {
            Path.Segment that = (Path.Segment)obj;
            if (!this.getName().equals(that.getName())) return false;
            return Math.abs(getIndex()) == Math.abs(that.getIndex());
        }
        return false;
    }

    public  BasicPathSegment( Name name );
    public  BasicPathSegment( Name name,
                             int index );

}