• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 package com.google.protobuf;
9 
10 import java.util.List;
11 
12 /**
13  * An interface extending {@code List<String>} used for repeated string fields to provide optional
14  * access to the data as a list of ByteStrings. The underlying implementation stores values as
15  * either ByteStrings or Strings (see {@link LazyStringArrayList}) depending on how the value was
16  * initialized or last read, and it is often more efficient to deal with lists of ByteStrings when
17  * handling protos that have been deserialized from bytes.
18  */
19 public interface ProtocolStringList extends List<String> {
20 
21   /** Returns a view of the data as a list of ByteStrings. */
asByteStringList()22   List<ByteString> asByteStringList();
23 }
24