public boolean remove(JsonElement element){
  return elements.remove(element);
}

public boolean remove ( JsonElement element ) { return elements . remove ( element ) ; }
removes the first occurrence of the specified element from this array , if it is present . if the array does not contain the element , it is unchanged .
