func (e PathElement) Compare(rhs PathElement) int {
	if e.FieldName != nil {
		if rhs.FieldName == nil {
			return -1
		}
		return strings.Compare(*e.FieldName, *rhs.FieldName)
	} else if rhs.FieldName != nil {
		return 1
	}

	if e.Key != nil {
		if rhs.Key == nil {
			return -1
		}
		return e.Key.Compare(*rhs.Key)
	} else if rhs.Key != nil {
		return 1
	}

	if e.Value != nil {
		if rhs.Value == nil {
			return -1
		}
		return value.Compare(*e.Value, *rhs.Value)
	} else if rhs.Value != nil {
		return 1
	}

	if e.Index != nil {
		if rhs.Index == nil {
			return -1
		}
		if *e.Index < *rhs.Index {
			return -1
		} else if *e.Index == *rhs.Index {
			return 0
		}
		return 1
	} else if rhs.Index != nil {
		return 1
	}

	return 0
}
// Compare provides an order for path elements.
Compare provides an order for path elements.
// Compare provides an order for path elements .
func (e PathElement) Compare(rhs PathElement) int {
	if e.FieldName != nil {
		if rhs.FieldName == nil {
			return -1
		}
		return strings.Compare(*e.FieldName, *rhs.FieldName)
	} else if rhs.FieldName != nil {
		return 1
	}
	if e.Key != nil {
		if rhs.Key == nil {
			return -1
		}
		return e.Key.Compare(*rhs.Key)
	} else if rhs.Key != nil {
		return 1
	}
	if e.Value != nil {
		if rhs.Value == nil {
			return -1
		}
		return value.Compare(*e.Value, *rhs.Value)
	} else if rhs.Value != nil {
		return 1
	}
	if e.Index != nil {
		if rhs.Index == nil {
			return -1
		}
		if *e.Index < *rhs.Index {
			return -1
		} else if *e.Index == *rhs.Index {
			return 0
		}
		return 1
	} else if rhs.Index != nil {
		return 1
	}
	return 0
}
func ( e PathElement ) Compare ( rhs PathElement ) int { if e . FieldName != nil { if rhs . FieldName == nil { return - 1 } return strings . Compare ( * e . FieldName , * rhs . FieldName ) } else if rhs . FieldName != nil { return 1 } if e . Key != nil { if rhs . Key == nil { return - 1 } return e . Key . Compare ( * rhs . Key ) } else if rhs . Key != nil { return 1 } if e . Value != nil { if rhs . Value == nil { return - 1 } return value . Compare ( * e . Value , * rhs . Value ) } else if rhs . Value != nil { return 1 } if e . Index != nil { if rhs . Index == nil { return - 1 } if * e . Index < * rhs . Index { return - 1 } else if * e . Index == * rhs . Index { return 0 } return 1 } else if rhs . Index != nil { return 1 } return 0 }
Compare provides an order for path elements.
Compare provides an order for path elements .