/java/src/com/google/publicalerts/cap/Area.java
https://code.google.com/p/cap-library/ · Java · 1380 lines · 1304 code · 59 blank · 17 comment · 311 complexity · 0d5d408fc50834ef6e793dd84f7abf18 MD5 · raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- package com.google.publicalerts.cap;
- public final class Area extends
- com.google.protobuf.GeneratedMessage
- implements AreaOrBuilder {
- // Use Area.newBuilder() to construct.
- private Area(Builder builder) {
- super(builder);
- }
- private Area(boolean noInit) {}
-
- private static final Area defaultInstance;
- public static Area getDefaultInstance() {
- return defaultInstance;
- }
-
- public Area getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Area_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Area_fieldAccessorTable;
- }
-
- private int bitField0_;
- // required string area_desc = 1;
- public static final int AREA_DESC_FIELD_NUMBER = 1;
- private java.lang.Object areaDesc_;
- public boolean hasAreaDesc() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getAreaDesc() {
- java.lang.Object ref = areaDesc_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- areaDesc_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getAreaDescBytes() {
- java.lang.Object ref = areaDesc_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- areaDesc_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // repeated .publicalerts.cap.Polygon polygon = 2;
- public static final int POLYGON_FIELD_NUMBER = 2;
- private java.util.List<com.google.publicalerts.cap.Polygon> polygon_;
- public java.util.List<com.google.publicalerts.cap.Polygon> getPolygonList() {
- return polygon_;
- }
- public java.util.List<? extends com.google.publicalerts.cap.PolygonOrBuilder>
- getPolygonOrBuilderList() {
- return polygon_;
- }
- public int getPolygonCount() {
- return polygon_.size();
- }
- public com.google.publicalerts.cap.Polygon getPolygon(int index) {
- return polygon_.get(index);
- }
- public com.google.publicalerts.cap.PolygonOrBuilder getPolygonOrBuilder(
- int index) {
- return polygon_.get(index);
- }
-
- // repeated .publicalerts.cap.Circle circle = 3;
- public static final int CIRCLE_FIELD_NUMBER = 3;
- private java.util.List<com.google.publicalerts.cap.Circle> circle_;
- public java.util.List<com.google.publicalerts.cap.Circle> getCircleList() {
- return circle_;
- }
- public java.util.List<? extends com.google.publicalerts.cap.CircleOrBuilder>
- getCircleOrBuilderList() {
- return circle_;
- }
- public int getCircleCount() {
- return circle_.size();
- }
- public com.google.publicalerts.cap.Circle getCircle(int index) {
- return circle_.get(index);
- }
- public com.google.publicalerts.cap.CircleOrBuilder getCircleOrBuilder(
- int index) {
- return circle_.get(index);
- }
-
- // repeated .publicalerts.cap.ValuePair geocode = 4;
- public static final int GEOCODE_FIELD_NUMBER = 4;
- private java.util.List<com.google.publicalerts.cap.ValuePair> geocode_;
- public java.util.List<com.google.publicalerts.cap.ValuePair> getGeocodeList() {
- return geocode_;
- }
- public java.util.List<? extends com.google.publicalerts.cap.ValuePairOrBuilder>
- getGeocodeOrBuilderList() {
- return geocode_;
- }
- public int getGeocodeCount() {
- return geocode_.size();
- }
- public com.google.publicalerts.cap.ValuePair getGeocode(int index) {
- return geocode_.get(index);
- }
- public com.google.publicalerts.cap.ValuePairOrBuilder getGeocodeOrBuilder(
- int index) {
- return geocode_.get(index);
- }
-
- // optional double altitude = 5;
- public static final int ALTITUDE_FIELD_NUMBER = 5;
- private double altitude_;
- public boolean hasAltitude() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public double getAltitude() {
- return altitude_;
- }
-
- // optional double ceiling = 6;
- public static final int CEILING_FIELD_NUMBER = 6;
- private double ceiling_;
- public boolean hasCeiling() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public double getCeiling() {
- return ceiling_;
- }
-
- private void initFields() {
- areaDesc_ = "";
- polygon_ = java.util.Collections.emptyList();
- circle_ = java.util.Collections.emptyList();
- geocode_ = java.util.Collections.emptyList();
- altitude_ = 0D;
- ceiling_ = 0D;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasAreaDesc()) {
- memoizedIsInitialized = 0;
- return false;
- }
- for (int i = 0; i < getPolygonCount(); i++) {
- if (!getPolygon(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getCircleCount(); i++) {
- if (!getCircle(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getGeocodeCount(); i++) {
- if (!getGeocode(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getAreaDescBytes());
- }
- for (int i = 0; i < polygon_.size(); i++) {
- output.writeMessage(2, polygon_.get(i));
- }
- for (int i = 0; i < circle_.size(); i++) {
- output.writeMessage(3, circle_.get(i));
- }
- for (int i = 0; i < geocode_.size(); i++) {
- output.writeMessage(4, geocode_.get(i));
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeDouble(5, altitude_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeDouble(6, ceiling_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getAreaDescBytes());
- }
- for (int i = 0; i < polygon_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, polygon_.get(i));
- }
- for (int i = 0; i < circle_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, circle_.get(i));
- }
- for (int i = 0; i < geocode_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, geocode_.get(i));
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(5, altitude_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(6, ceiling_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.publicalerts.cap.Area)) {
- return super.equals(obj);
- }
- com.google.publicalerts.cap.Area other = (com.google.publicalerts.cap.Area) obj;
-
- boolean result = true;
- result = result && (hasAreaDesc() == other.hasAreaDesc());
- if (hasAreaDesc()) {
- result = result && getAreaDesc()
- .equals(other.getAreaDesc());
- }
- result = result && getPolygonList()
- .equals(other.getPolygonList());
- result = result && getCircleList()
- .equals(other.getCircleList());
- result = result && getGeocodeList()
- .equals(other.getGeocodeList());
- result = result && (hasAltitude() == other.hasAltitude());
- if (hasAltitude()) {
- result = result && (Double.doubleToLongBits(getAltitude()) == Double.doubleToLongBits(other.getAltitude()));
- }
- result = result && (hasCeiling() == other.hasCeiling());
- if (hasCeiling()) {
- result = result && (Double.doubleToLongBits(getCeiling()) == Double.doubleToLongBits(other.getCeiling()));
- }
- result = result &&
- getUnknownFields().equals(other.getUnknownFields());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasAreaDesc()) {
- hash = (37 * hash) + AREA_DESC_FIELD_NUMBER;
- hash = (53 * hash) + getAreaDesc().hashCode();
- }
- if (getPolygonCount() > 0) {
- hash = (37 * hash) + POLYGON_FIELD_NUMBER;
- hash = (53 * hash) + getPolygonList().hashCode();
- }
- if (getCircleCount() > 0) {
- hash = (37 * hash) + CIRCLE_FIELD_NUMBER;
- hash = (53 * hash) + getCircleList().hashCode();
- }
- if (getGeocodeCount() > 0) {
- hash = (37 * hash) + GEOCODE_FIELD_NUMBER;
- hash = (53 * hash) + getGeocodeList().hashCode();
- }
- if (hasAltitude()) {
- hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
- hash = (53 * hash) + hashLong(
- Double.doubleToLongBits(getAltitude()));
- }
- if (hasCeiling()) {
- hash = (37 * hash) + CEILING_FIELD_NUMBER;
- hash = (53 * hash) + hashLong(
- Double.doubleToLongBits(getCeiling()));
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- return hash;
- }
-
- public static com.google.publicalerts.cap.Area parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.google.publicalerts.cap.Area parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.google.publicalerts.cap.Area parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.google.publicalerts.cap.Area parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.google.publicalerts.cap.Area prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements com.google.publicalerts.cap.AreaOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Area_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Area_fieldAccessorTable;
- }
-
- // Construct using com.google.publicalerts.cap.Area.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getPolygonFieldBuilder();
- getCircleFieldBuilder();
- getGeocodeFieldBuilder();
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- areaDesc_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- if (polygonBuilder_ == null) {
- polygon_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- polygonBuilder_.clear();
- }
- if (circleBuilder_ == null) {
- circle_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- circleBuilder_.clear();
- }
- if (geocodeBuilder_ == null) {
- geocode_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- geocodeBuilder_.clear();
- }
- altitude_ = 0D;
- bitField0_ = (bitField0_ & ~0x00000010);
- ceiling_ = 0D;
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.publicalerts.cap.Area.getDescriptor();
- }
-
- public com.google.publicalerts.cap.Area getDefaultInstanceForType() {
- return com.google.publicalerts.cap.Area.getDefaultInstance();
- }
-
- public com.google.publicalerts.cap.Area build() {
- com.google.publicalerts.cap.Area result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private com.google.publicalerts.cap.Area buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- com.google.publicalerts.cap.Area result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public com.google.publicalerts.cap.Area buildPartial() {
- com.google.publicalerts.cap.Area result = new com.google.publicalerts.cap.Area(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.areaDesc_ = areaDesc_;
- if (polygonBuilder_ == null) {
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- polygon_ = java.util.Collections.unmodifiableList(polygon_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.polygon_ = polygon_;
- } else {
- result.polygon_ = polygonBuilder_.build();
- }
- if (circleBuilder_ == null) {
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- circle_ = java.util.Collections.unmodifiableList(circle_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.circle_ = circle_;
- } else {
- result.circle_ = circleBuilder_.build();
- }
- if (geocodeBuilder_ == null) {
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- geocode_ = java.util.Collections.unmodifiableList(geocode_);
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.geocode_ = geocode_;
- } else {
- result.geocode_ = geocodeBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000002;
- }
- result.altitude_ = altitude_;
- if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
- to_bitField0_ |= 0x00000004;
- }
- result.ceiling_ = ceiling_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.publicalerts.cap.Area) {
- return mergeFrom((com.google.publicalerts.cap.Area)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.publicalerts.cap.Area other) {
- if (other == com.google.publicalerts.cap.Area.getDefaultInstance()) return this;
- if (other.hasAreaDesc()) {
- setAreaDesc(other.getAreaDesc());
- }
- if (polygonBuilder_ == null) {
- if (!other.polygon_.isEmpty()) {
- if (polygon_.isEmpty()) {
- polygon_ = other.polygon_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensurePolygonIsMutable();
- polygon_.addAll(other.polygon_);
- }
- onChanged();
- }
- } else {
- if (!other.polygon_.isEmpty()) {
- if (polygonBuilder_.isEmpty()) {
- polygonBuilder_.dispose();
- polygonBuilder_ = null;
- polygon_ = other.polygon_;
- bitField0_ = (bitField0_ & ~0x00000002);
- polygonBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getPolygonFieldBuilder() : null;
- } else {
- polygonBuilder_.addAllMessages(other.polygon_);
- }
- }
- }
- if (circleBuilder_ == null) {
- if (!other.circle_.isEmpty()) {
- if (circle_.isEmpty()) {
- circle_ = other.circle_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureCircleIsMutable();
- circle_.addAll(other.circle_);
- }
- onChanged();
- }
- } else {
- if (!other.circle_.isEmpty()) {
- if (circleBuilder_.isEmpty()) {
- circleBuilder_.dispose();
- circleBuilder_ = null;
- circle_ = other.circle_;
- bitField0_ = (bitField0_ & ~0x00000004);
- circleBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getCircleFieldBuilder() : null;
- } else {
- circleBuilder_.addAllMessages(other.circle_);
- }
- }
- }
- if (geocodeBuilder_ == null) {
- if (!other.geocode_.isEmpty()) {
- if (geocode_.isEmpty()) {
- geocode_ = other.geocode_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureGeocodeIsMutable();
- geocode_.addAll(other.geocode_);
- }
- onChanged();
- }
- } else {
- if (!other.geocode_.isEmpty()) {
- if (geocodeBuilder_.isEmpty()) {
- geocodeBuilder_.dispose();
- geocodeBuilder_ = null;
- geocode_ = other.geocode_;
- bitField0_ = (bitField0_ & ~0x00000008);
- geocodeBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getGeocodeFieldBuilder() : null;
- } else {
- geocodeBuilder_.addAllMessages(other.geocode_);
- }
- }
- }
- if (other.hasAltitude()) {
- setAltitude(other.getAltitude());
- }
- if (other.hasCeiling()) {
- setCeiling(other.getCeiling());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasAreaDesc()) {
-
- return false;
- }
- for (int i = 0; i < getPolygonCount(); i++) {
- if (!getPolygon(i).isInitialized()) {
-
- return false;
- }
- }
- for (int i = 0; i < getCircleCount(); i++) {
- if (!getCircle(i).isInitialized()) {
-
- return false;
- }
- }
- for (int i = 0; i < getGeocodeCount(); i++) {
- if (!getGeocode(i).isInitialized()) {
-
- return false;
- }
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- areaDesc_ = input.readBytes();
- break;
- }
- case 18: {
- com.google.publicalerts.cap.Polygon.Builder subBuilder = com.google.publicalerts.cap.Polygon.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addPolygon(subBuilder.buildPartial());
- break;
- }
- case 26: {
- com.google.publicalerts.cap.Circle.Builder subBuilder = com.google.publicalerts.cap.Circle.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addCircle(subBuilder.buildPartial());
- break;
- }
- case 34: {
- com.google.publicalerts.cap.ValuePair.Builder subBuilder = com.google.publicalerts.cap.ValuePair.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addGeocode(subBuilder.buildPartial());
- break;
- }
- case 41: {
- bitField0_ |= 0x00000010;
- altitude_ = input.readDouble();
- break;
- }
- case 49: {
- bitField0_ |= 0x00000020;
- ceiling_ = input.readDouble();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required string area_desc = 1;
- private java.lang.Object areaDesc_ = "";
- public boolean hasAreaDesc() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getAreaDesc() {
- java.lang.Object ref = areaDesc_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- areaDesc_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setAreaDesc(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- areaDesc_ = value;
- onChanged();
- return this;
- }
- public Builder clearAreaDesc() {
- bitField0_ = (bitField0_ & ~0x00000001);
- areaDesc_ = getDefaultInstance().getAreaDesc();
- onChanged();
- return this;
- }
- void setAreaDesc(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- areaDesc_ = value;
- onChanged();
- }
-
- // repeated .publicalerts.cap.Polygon polygon = 2;
- private java.util.List<com.google.publicalerts.cap.Polygon> polygon_ =
- java.util.Collections.emptyList();
- private void ensurePolygonIsMutable() {
- if (!((bitField0_ & 0x00000002) == 0x00000002)) {
- polygon_ = new java.util.ArrayList<com.google.publicalerts.cap.Polygon>(polygon_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Polygon, com.google.publicalerts.cap.Polygon.Builder, com.google.publicalerts.cap.PolygonOrBuilder> polygonBuilder_;
-
- public java.util.List<com.google.publicalerts.cap.Polygon> getPolygonList() {
- if (polygonBuilder_ == null) {
- return java.util.Collections.unmodifiableList(polygon_);
- } else {
- return polygonBuilder_.getMessageList();
- }
- }
- public int getPolygonCount() {
- if (polygonBuilder_ == null) {
- return polygon_.size();
- } else {
- return polygonBuilder_.getCount();
- }
- }
- public com.google.publicalerts.cap.Polygon getPolygon(int index) {
- if (polygonBuilder_ == null) {
- return polygon_.get(index);
- } else {
- return polygonBuilder_.getMessage(index);
- }
- }
- public Builder setPolygon(
- int index, com.google.publicalerts.cap.Polygon value) {
- if (polygonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePolygonIsMutable();
- polygon_.set(index, value);
- onChanged();
- } else {
- polygonBuilder_.setMessage(index, value);
- }
- return this;
- }
- public Builder setPolygon(
- int index, com.google.publicalerts.cap.Polygon.Builder builderForValue) {
- if (polygonBuilder_ == null) {
- ensurePolygonIsMutable();
- polygon_.set(index, builderForValue.build());
- onChanged();
- } else {
- polygonBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addPolygon(com.google.publicalerts.cap.Polygon value) {
- if (polygonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePolygonIsMutable();
- polygon_.add(value);
- onChanged();
- } else {
- polygonBuilder_.addMessage(value);
- }
- return this;
- }
- public Builder addPolygon(
- int index, com.google.publicalerts.cap.Polygon value) {
- if (polygonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePolygonIsMutable();
- polygon_.add(index, value);
- onChanged();
- } else {
- polygonBuilder_.addMessage(index, value);
- }
- return this;
- }
- public Builder addPolygon(
- com.google.publicalerts.cap.Polygon.Builder builderForValue) {
- if (polygonBuilder_ == null) {
- ensurePolygonIsMutable();
- polygon_.add(builderForValue.build());
- onChanged();
- } else {
- polygonBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- public Builder addPolygon(
- int index, com.google.publicalerts.cap.Polygon.Builder builderForValue) {
- if (polygonBuilder_ == null) {
- ensurePolygonIsMutable();
- polygon_.add(index, builderForValue.build());
- onChanged();
- } else {
- polygonBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addAllPolygon(
- java.lang.Iterable<? extends com.google.publicalerts.cap.Polygon> values) {
- if (polygonBuilder_ == null) {
- ensurePolygonIsMutable();
- super.addAll(values, polygon_);
- onChanged();
- } else {
- polygonBuilder_.addAllMessages(values);
- }
- return this;
- }
- public Builder clearPolygon() {
- if (polygonBuilder_ == null) {
- polygon_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- polygonBuilder_.clear();
- }
- return this;
- }
- public Builder removePolygon(int index) {
- if (polygonBuilder_ == null) {
- ensurePolygonIsMutable();
- polygon_.remove(index);
- onChanged();
- } else {
- polygonBuilder_.remove(index);
- }
- return this;
- }
- public com.google.publicalerts.cap.Polygon.Builder getPolygonBuilder(
- int index) {
- return getPolygonFieldBuilder().getBuilder(index);
- }
- public com.google.publicalerts.cap.PolygonOrBuilder getPolygonOrBuilder(
- int index) {
- if (polygonBuilder_ == null) {
- return polygon_.get(index); } else {
- return polygonBuilder_.getMessageOrBuilder(index);
- }
- }
- public java.util.List<? extends com.google.publicalerts.cap.PolygonOrBuilder>
- getPolygonOrBuilderList() {
- if (polygonBuilder_ != null) {
- return polygonBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(polygon_);
- }
- }
- public com.google.publicalerts.cap.Polygon.Builder addPolygonBuilder() {
- return getPolygonFieldBuilder().addBuilder(
- com.google.publicalerts.cap.Polygon.getDefaultInstance());
- }
- public com.google.publicalerts.cap.Polygon.Builder addPolygonBuilder(
- int index) {
- return getPolygonFieldBuilder().addBuilder(
- index, com.google.publicalerts.cap.Polygon.getDefaultInstance());
- }
- public java.util.List<com.google.publicalerts.cap.Polygon.Builder>
- getPolygonBuilderList() {
- return getPolygonFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Polygon, com.google.publicalerts.cap.Polygon.Builder, com.google.publicalerts.cap.PolygonOrBuilder>
- getPolygonFieldBuilder() {
- if (polygonBuilder_ == null) {
- polygonBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Polygon, com.google.publicalerts.cap.Polygon.Builder, com.google.publicalerts.cap.PolygonOrBuilder>(
- polygon_,
- ((bitField0_ & 0x00000002) == 0x00000002),
- getParentForChildren(),
- isClean());
- polygon_ = null;
- }
- return polygonBuilder_;
- }
-
- // repeated .publicalerts.cap.Circle circle = 3;
- private java.util.List<com.google.publicalerts.cap.Circle> circle_ =
- java.util.Collections.emptyList();
- private void ensureCircleIsMutable() {
- if (!((bitField0_ & 0x00000004) == 0x00000004)) {
- circle_ = new java.util.ArrayList<com.google.publicalerts.cap.Circle>(circle_);
- bitField0_ |= 0x00000004;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Circle, com.google.publicalerts.cap.Circle.Builder, com.google.publicalerts.cap.CircleOrBuilder> circleBuilder_;
-
- public java.util.List<com.google.publicalerts.cap.Circle> getCircleList() {
- if (circleBuilder_ == null) {
- return java.util.Collections.unmodifiableList(circle_);
- } else {
- return circleBuilder_.getMessageList();
- }
- }
- public int getCircleCount() {
- if (circleBuilder_ == null) {
- return circle_.size();
- } else {
- return circleBuilder_.getCount();
- }
- }
- public com.google.publicalerts.cap.Circle getCircle(int index) {
- if (circleBuilder_ == null) {
- return circle_.get(index);
- } else {
- return circleBuilder_.getMessage(index);
- }
- }
- public Builder setCircle(
- int index, com.google.publicalerts.cap.Circle value) {
- if (circleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCircleIsMutable();
- circle_.set(index, value);
- onChanged();
- } else {
- circleBuilder_.setMessage(index, value);
- }
- return this;
- }
- public Builder setCircle(
- int index, com.google.publicalerts.cap.Circle.Builder builderForValue) {
- if (circleBuilder_ == null) {
- ensureCircleIsMutable();
- circle_.set(index, builderForValue.build());
- onChanged();
- } else {
- circleBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addCircle(com.google.publicalerts.cap.Circle value) {
- if (circleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCircleIsMutable();
- circle_.add(value);
- onChanged();
- } else {
- circleBuilder_.addMessage(value);
- }
- return this;
- }
- public Builder addCircle(
- int index, com.google.publicalerts.cap.Circle value) {
- if (circleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCircleIsMutable();
- circle_.add(index, value);
- onChanged();
- } else {
- circleBuilder_.addMessage(index, value);
- }
- return this;
- }
- public Builder addCircle(
- com.google.publicalerts.cap.Circle.Builder builderForValue) {
- if (circleBuilder_ == null) {
- ensureCircleIsMutable();
- circle_.add(builderForValue.build());
- onChanged();
- } else {
- circleBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- public Builder addCircle(
- int index, com.google.publicalerts.cap.Circle.Builder builderForValue) {
- if (circleBuilder_ == null) {
- ensureCircleIsMutable();
- circle_.add(index, builderForValue.build());
- onChanged();
- } else {
- circleBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addAllCircle(
- java.lang.Iterable<? extends com.google.publicalerts.cap.Circle> values) {
- if (circleBuilder_ == null) {
- ensureCircleIsMutable();
- super.addAll(values, circle_);
- onChanged();
- } else {
- circleBuilder_.addAllMessages(values);
- }
- return this;
- }
- public Builder clearCircle() {
- if (circleBuilder_ == null) {
- circle_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- circleBuilder_.clear();
- }
- return this;
- }
- public Builder removeCircle(int index) {
- if (circleBuilder_ == null) {
- ensureCircleIsMutable();
- circle_.remove(index);
- onChanged();
- } else {
- circleBuilder_.remove(index);
- }
- return this;
- }
- public com.google.publicalerts.cap.Circle.Builder getCircleBuilder(
- int index) {
- return getCircleFieldBuilder().getBuilder(index);
- }
- public com.google.publicalerts.cap.CircleOrBuilder getCircleOrBuilder(
- int index) {
- if (circleBuilder_ == null) {
- return circle_.get(index); } else {
- return circleBuilder_.getMessageOrBuilder(index);
- }
- }
- public java.util.List<? extends com.google.publicalerts.cap.CircleOrBuilder>
- getCircleOrBuilderList() {
- if (circleBuilder_ != null) {
- return circleBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(circle_);
- }
- }
- public com.google.publicalerts.cap.Circle.Builder addCircleBuilder() {
- return getCircleFieldBuilder().addBuilder(
- com.google.publicalerts.cap.Circle.getDefaultInstance());
- }
- public com.google.publicalerts.cap.Circle.Builder addCircleBuilder(
- int index) {
- return getCircleFieldBuilder().addBuilder(
- index, com.google.publicalerts.cap.Circle.getDefaultInstance());
- }
- public java.util.List<com.google.publicalerts.cap.Circle.Builder>
- getCircleBuilderList() {
- return getCircleFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Circle, com.google.publicalerts.cap.Circle.Builder, com.google.publicalerts.cap.CircleOrBuilder>
- getCircleFieldBuilder() {
- if (circleBuilder_ == null) {
- circleBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.Circle, com.google.publicalerts.cap.Circle.Builder, com.google.publicalerts.cap.CircleOrBuilder>(
- circle_,
- ((bitField0_ & 0x00000004) == 0x00000004),
- getParentForChildren(),
- isClean());
- circle_ = null;
- }
- return circleBuilder_;
- }
-
- // repeated .publicalerts.cap.ValuePair geocode = 4;
- private java.util.List<com.google.publicalerts.cap.ValuePair> geocode_ =
- java.util.Collections.emptyList();
- private void ensureGeocodeIsMutable() {
- if (!((bitField0_ & 0x00000008) == 0x00000008)) {
- geocode_ = new java.util.ArrayList<com.google.publicalerts.cap.ValuePair>(geocode_);
- bitField0_ |= 0x00000008;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.ValuePair, com.google.publicalerts.cap.ValuePair.Builder, com.google.publicalerts.cap.ValuePairOrBuilder> geocodeBuilder_;
-
- public java.util.List<com.google.publicalerts.cap.ValuePair> getGeocodeList() {
- if (geocodeBuilder_ == null) {
- return java.util.Collections.unmodifiableList(geocode_);
- } else {
- return geocodeBuilder_.getMessageList();
- }
- }
- public int getGeocodeCount() {
- if (geocodeBuilder_ == null) {
- return geocode_.size();
- } else {
- return geocodeBuilder_.getCount();
- }
- }
- public com.google.publicalerts.cap.ValuePair getGeocode(int index) {
- if (geocodeBuilder_ == null) {
- return geocode_.get(index);
- } else {
- return geocodeBuilder_.getMessage(index);
- }
- }
- public Builder setGeocode(
- int index, com.google.publicalerts.cap.ValuePair value) {
- if (geocodeBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGeocodeIsMutable();
- geocode_.set(index, value);
- onChanged();
- } else {
- geocodeBuilder_.setMessage(index, value);
- }
- return this;
- }
- public Builder setGeocode(
- int index, com.google.publicalerts.cap.ValuePair.Builder builderForValue) {
- if (geocodeBuilder_ == null) {
- ensureGeocodeIsMutable();
- geocode_.set(index, builderForValue.build());
- onChanged();
- } else {
- geocodeBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addGeocode(com.google.publicalerts.cap.ValuePair value) {
- if (geocodeBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGeocodeIsMutable();
- geocode_.add(value);
- onChanged();
- } else {
- geocodeBuilder_.addMessage(value);
- }
- return this;
- }
- public Builder addGeocode(
- int index, com.google.publicalerts.cap.ValuePair value) {
- if (geocodeBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGeocodeIsMutable();
- geocode_.add(index, value);
- onChanged();
- } else {
- geocodeBuilder_.addMessage(index, value);
- }
- return this;
- }
- public Builder addGeocode(
- com.google.publicalerts.cap.ValuePair.Builder builderForValue) {
- if (geocodeBuilder_ == null) {
- ensureGeocodeIsMutable();
- geocode_.add(builderForValue.build());
- onChanged();
- } else {
- geocodeBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- public Builder addGeocode(
- int index, com.google.publicalerts.cap.ValuePair.Builder builderForValue) {
- if (geocodeBuilder_ == null) {
- ensureGeocodeIsMutable();
- geocode_.add(index, builderForValue.build());
- onChanged();
- } else {
- geocodeBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addAllGeocode(
- java.lang.Iterable<? extends com.google.publicalerts.cap.ValuePair> values) {
- if (geocodeBuilder_ == null) {
- ensureGeocodeIsMutable();
- super.addAll(values, geocode_);
- onChanged();
- } else {
- geocodeBuilder_.addAllMessages(values);
- }
- return this;
- }
- public Builder clearGeocode() {
- if (geocodeBuilder_ == null) {
- geocode_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- geocodeBuilder_.clear();
- }
- return this;
- }
- public Builder removeGeocode(int index) {
- if (geocodeBuilder_ == null) {
- ensureGeocodeIsMutable();
- geocode_.remove(index);
- onChanged();
- } else {
- geocodeBuilder_.remove(index);
- }
- return this;
- }
- public com.google.publicalerts.cap.ValuePair.Builder getGeocodeBuilder(
- int index) {
- return getGeocodeFieldBuilder().getBuilder(index);
- }
- public com.google.publicalerts.cap.ValuePairOrBuilder getGeocodeOrBuilder(
- int index) {
- if (geocodeBuilder_ == null) {
- return geocode_.get(index); } else {
- return geocodeBuilder_.getMessageOrBuilder(index);
- }
- }
- public java.util.List<? extends com.google.publicalerts.cap.ValuePairOrBuilder>
- getGeocodeOrBuilderList() {
- if (geocodeBuilder_ != null) {
- return geocodeBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(geocode_);
- }
- }
- public com.google.publicalerts.cap.ValuePair.Builder addGeocodeBuilder() {
- return getGeocodeFieldBuilder().addBuilder(
- com.google.publicalerts.cap.ValuePair.getDefaultInstance());
- }
- public com.google.publicalerts.cap.ValuePair.Builder addGeocodeBuilder(
- int index) {
- return getGeocodeFieldBuilder().addBuilder(
- index, com.google.publicalerts.cap.ValuePair.getDefaultInstance());
- }
- public java.util.List<com.google.publicalerts.cap.ValuePair.Builder>
- getGeocodeBuilderList() {
- return getGeocodeFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.ValuePair, com.google.publicalerts.cap.ValuePair.Builder, com.google.publicalerts.cap.ValuePairOrBuilder>
- getGeocodeFieldBuilder() {
- if (geocodeBuilder_ == null) {
- geocodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
- com.google.publicalerts.cap.ValuePair, com.google.publicalerts.cap.ValuePair.Builder, com.google.publicalerts.cap.ValuePairOrBuilder>(
- geocode_,
- ((bitField0_ & 0x00000008) == 0x00000008),
- getParentForChildren(),
- isClean());
- geocode_ = null;
- }
- return geocodeBuilder_;
- }
-
- // optional double altitude = 5;
- private double altitude_ ;
- public boolean hasAltitude() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- public double getAltitude() {
- return altitude_;
- }
- public Builder setAltitude(double value) {
- bitField0_ |= 0x00000010;
- altitude_ = value;
- onChanged();
- return this;
- }
- public Builder clearAltitude() {
- bitField0_ = (bitField0_ & ~0x00000010);
- altitude_ = 0D;
- onChanged();
- return this;
- }
-
- // optional double ceiling = 6;
- private double ceiling_ ;
- public boolean hasCeiling() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- public double getCeiling() {
- return ceiling_;
- }
- public Builder setCeiling(double value) {
- bitField0_ |= 0x00000020;
- ceiling_ = value;
- onChanged();
- return this;
- }
- public Builder clearCeiling() {
- bitField0_ = (bitField0_ & ~0x00000020);
- ceiling_ = 0D;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:publicalerts.cap.Area)
- }
-
- static {
- defaultInstance = new Area(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:publicalerts.cap.Area)
- }