com.google.protobuf.SingleFieldBuilder.dispose()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中com.google.protobuf.SingleFieldBuilder.dispose()方法的一些代码示例,展示了SingleFieldBuilder.dispose()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SingleFieldBuilder.dispose()方法的具体详情如下:
包路径:com.google.protobuf.SingleFieldBuilder
类名称:SingleFieldBuilder
方法名:dispose

SingleFieldBuilder.dispose介绍

暂无

代码示例

代码示例来源:origin: osmandapp/Osmand

/**
 * Removes all of the elements from this list.
 * The list will be empty after this call returns.
 */
public void clear() {
 messages = Collections.emptyList();
 isMessagesListMutable = false;
 if (builders != null) {
  for (SingleFieldBuilder<MType, BType, IType> entry :
    builders) {
   if (entry != null) {
    entry.dispose();
   }
  }
  builders = null;
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: com.google.protobuf/protobuf-java

/**
 * Removes all of the elements from this list.
 * The list will be empty after this call returns.
 */
public void clear() {
 messages = Collections.emptyList();
 isMessagesListMutable = false;
 if (builders != null) {
  for (SingleFieldBuilder<MType, BType, IType> entry :
    builders) {
   if (entry != null) {
    entry.dispose();
   }
  }
  builders = null;
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: osmandapp/Osmand

/**
 * Sets a  message at the specified index replacing the existing item at
 * that index.
 *
 * @param index the index to set.
 * @param message the message to set
 * @return the builder
 */
public RepeatedFieldBuilder<MType, BType, IType> setMessage(
  int index, MType message) {
 if (message == null) {
  throw new NullPointerException();
 }
 ensureMutableMessageList();
 messages.set(index, message);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.set(index, null);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
 return this;
}

代码示例来源:origin: osmandapp/Osmand

/**
 * Removes the element at the specified position in this list. Shifts any
 * subsequent elements to the left (subtracts one from their indices).
 * Returns the element that was removed from the list.
 *
 * @param index the index at which to remove the message
 */
public void remove(int index) {
 ensureMutableMessageList();
 messages.remove(index);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.remove(index);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: com.google.protobuf/protobuf-java

/**
 * Removes the element at the specified position in this list. Shifts any
 * subsequent elements to the left (subtracts one from their indices).
 * Returns the element that was removed from the list.
 *
 * @param index the index at which to remove the message
 */
public void remove(int index) {
 ensureMutableMessageList();
 messages.remove(index);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.remove(index);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: com.google.protobuf/protobuf-java

/**
 * Sets a  message at the specified index replacing the existing item at
 * that index.
 *
 * @param index the index to set.
 * @param message the message to set
 * @return the builder
 */
public RepeatedFieldBuilder<MType, BType, IType> setMessage(
  int index, MType message) {
 if (message == null) {
  throw new NullPointerException();
 }
 ensureMutableMessageList();
 messages.set(index, message);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.set(index, null);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
 return this;
}

代码示例来源:origin: yeriomin/play-store-api

/**
 * Removes all of the elements from this list.
 * The list will be empty after this call returns.
 */
public void clear() {
 messages = Collections.emptyList();
 isMessagesListMutable = false;
 if (builders != null) {
  for (SingleFieldBuilder<MType, BType, IType> entry :
    builders) {
   if (entry != null) {
    entry.dispose();
   }
  }
  builders = null;
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

/**
 * Removes all of the elements from this list.
 * The list will be empty after this call returns.
 */
public void clear() {
 messages = Collections.emptyList();
 isMessagesListMutable = false;
 if (builders != null) {
  for (SingleFieldBuilder<MType, BType, IType> entry :
    builders) {
   if (entry != null) {
    entry.dispose();
   }
  }
  builders = null;
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

/**
 * Removes the element at the specified position in this list. Shifts any
 * subsequent elements to the left (subtracts one from their indices).
 * Returns the element that was removed from the list.
 *
 * @param index the index at which to remove the message
 */
public void remove(int index) {
 ensureMutableMessageList();
 messages.remove(index);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.remove(index);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: yeriomin/play-store-api

/**
 * Removes the element at the specified position in this list. Shifts any
 * subsequent elements to the left (subtracts one from their indices).
 * Returns the element that was removed from the list.
 *
 * @param index the index at which to remove the message
 */
public void remove(int index) {
 ensureMutableMessageList();
 messages.remove(index);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.remove(index);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

/**
 * Sets a  message at the specified index replacing the existing item at
 * that index.
 *
 * @param index the index to set.
 * @param message the message to set
 * @return the builder
 */
public RepeatedFieldBuilder<MType, BType, IType> setMessage(
  int index, MType message) {
 if (message == null) {
  throw new NullPointerException();
 }
 ensureMutableMessageList();
 messages.set(index, message);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.set(index, null);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
 return this;
}

代码示例来源:origin: yeriomin/play-store-api

/**
 * Sets a  message at the specified index replacing the existing item at
 * that index.
 *
 * @param index the index to set.
 * @param message the message to set
 * @return the builder
 */
public RepeatedFieldBuilder<MType, BType, IType> setMessage(
  int index, MType message) {
 if (message == null) {
  throw new NullPointerException();
 }
 ensureMutableMessageList();
 messages.set(index, message);
 if (builders != null) {
  SingleFieldBuilder<MType, BType, IType> entry =
    builders.set(index, null);
  if (entry != null) {
   entry.dispose();
  }
 }
 onChanged();
 incrementModCounts();
 return this;
}

相关文章