All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openlca.proto.ProtoNwFactor Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: olca.proto

package org.openlca.proto;

/**
 * 
 * A normalization and weighting factor of a [NwSet] related to an impact
 * category. Depending on the purpose of the [NwSet] (normalization, weighting,
 * or both) the normalization and weighting factor can be present or not.
 * 
* * Protobuf type {@code protolca.ProtoNwFactor} */ public final class ProtoNwFactor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protolca.ProtoNwFactor) ProtoNwFactorOrBuilder { private static final long serialVersionUID = 0L; // Use ProtoNwFactor.newBuilder() to construct. private ProtoNwFactor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ProtoNwFactor() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ProtoNwFactor(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ProtoNwFactor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { org.openlca.proto.ProtoRef.Builder subBuilder = null; if (impactCategory_ != null) { subBuilder = impactCategory_.toBuilder(); } impactCategory_ = input.readMessage(org.openlca.proto.ProtoRef.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(impactCategory_); impactCategory_ = subBuilder.buildPartial(); } break; } case 17: { normalisationFactor_ = input.readDouble(); break; } case 25: { weightingFactor_ = input.readDouble(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openlca.proto.Proto.internal_static_protolca_ProtoNwFactor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.openlca.proto.Proto.internal_static_protolca_ProtoNwFactor_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openlca.proto.ProtoNwFactor.class, org.openlca.proto.ProtoNwFactor.Builder.class); } public static final int IMPACT_CATEGORY_FIELD_NUMBER = 1; private org.openlca.proto.ProtoRef impactCategory_; /** * .protolca.ProtoRef impact_category = 1; * @return Whether the impactCategory field is set. */ @java.lang.Override public boolean hasImpactCategory() { return impactCategory_ != null; } /** * .protolca.ProtoRef impact_category = 1; * @return The impactCategory. */ @java.lang.Override public org.openlca.proto.ProtoRef getImpactCategory() { return impactCategory_ == null ? org.openlca.proto.ProtoRef.getDefaultInstance() : impactCategory_; } /** * .protolca.ProtoRef impact_category = 1; */ @java.lang.Override public org.openlca.proto.ProtoRefOrBuilder getImpactCategoryOrBuilder() { return getImpactCategory(); } public static final int NORMALISATION_FACTOR_FIELD_NUMBER = 2; private double normalisationFactor_; /** * double normalisation_factor = 2; * @return The normalisationFactor. */ @java.lang.Override public double getNormalisationFactor() { return normalisationFactor_; } public static final int WEIGHTING_FACTOR_FIELD_NUMBER = 3; private double weightingFactor_; /** * double weighting_factor = 3; * @return The weightingFactor. */ @java.lang.Override public double getWeightingFactor() { return weightingFactor_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (impactCategory_ != null) { output.writeMessage(1, getImpactCategory()); } if (normalisationFactor_ != 0D) { output.writeDouble(2, normalisationFactor_); } if (weightingFactor_ != 0D) { output.writeDouble(3, weightingFactor_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (impactCategory_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getImpactCategory()); } if (normalisationFactor_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(2, normalisationFactor_); } if (weightingFactor_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(3, weightingFactor_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.openlca.proto.ProtoNwFactor)) { return super.equals(obj); } org.openlca.proto.ProtoNwFactor other = (org.openlca.proto.ProtoNwFactor) obj; if (hasImpactCategory() != other.hasImpactCategory()) return false; if (hasImpactCategory()) { if (!getImpactCategory() .equals(other.getImpactCategory())) return false; } if (java.lang.Double.doubleToLongBits(getNormalisationFactor()) != java.lang.Double.doubleToLongBits( other.getNormalisationFactor())) return false; if (java.lang.Double.doubleToLongBits(getWeightingFactor()) != java.lang.Double.doubleToLongBits( other.getWeightingFactor())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasImpactCategory()) { hash = (37 * hash) + IMPACT_CATEGORY_FIELD_NUMBER; hash = (53 * hash) + getImpactCategory().hashCode(); } hash = (37 * hash) + NORMALISATION_FACTOR_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getNormalisationFactor())); hash = (37 * hash) + WEIGHTING_FACTOR_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getWeightingFactor())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.openlca.proto.ProtoNwFactor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoNwFactor parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoNwFactor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoNwFactor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoNwFactor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoNwFactor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoNwFactor parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.openlca.proto.ProtoNwFactor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.openlca.proto.ProtoNwFactor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.openlca.proto.ProtoNwFactor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.openlca.proto.ProtoNwFactor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.openlca.proto.ProtoNwFactor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.openlca.proto.ProtoNwFactor prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A normalization and weighting factor of a [NwSet] related to an impact
   * category. Depending on the purpose of the [NwSet] (normalization, weighting,
   * or both) the normalization and weighting factor can be present or not.
   * 
* * Protobuf type {@code protolca.ProtoNwFactor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protolca.ProtoNwFactor) org.openlca.proto.ProtoNwFactorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openlca.proto.Proto.internal_static_protolca_ProtoNwFactor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.openlca.proto.Proto.internal_static_protolca_ProtoNwFactor_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openlca.proto.ProtoNwFactor.class, org.openlca.proto.ProtoNwFactor.Builder.class); } // Construct using org.openlca.proto.ProtoNwFactor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (impactCategoryBuilder_ == null) { impactCategory_ = null; } else { impactCategory_ = null; impactCategoryBuilder_ = null; } normalisationFactor_ = 0D; weightingFactor_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.openlca.proto.Proto.internal_static_protolca_ProtoNwFactor_descriptor; } @java.lang.Override public org.openlca.proto.ProtoNwFactor getDefaultInstanceForType() { return org.openlca.proto.ProtoNwFactor.getDefaultInstance(); } @java.lang.Override public org.openlca.proto.ProtoNwFactor build() { org.openlca.proto.ProtoNwFactor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.openlca.proto.ProtoNwFactor buildPartial() { org.openlca.proto.ProtoNwFactor result = new org.openlca.proto.ProtoNwFactor(this); if (impactCategoryBuilder_ == null) { result.impactCategory_ = impactCategory_; } else { result.impactCategory_ = impactCategoryBuilder_.build(); } result.normalisationFactor_ = normalisationFactor_; result.weightingFactor_ = weightingFactor_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.openlca.proto.ProtoNwFactor) { return mergeFrom((org.openlca.proto.ProtoNwFactor)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.openlca.proto.ProtoNwFactor other) { if (other == org.openlca.proto.ProtoNwFactor.getDefaultInstance()) return this; if (other.hasImpactCategory()) { mergeImpactCategory(other.getImpactCategory()); } if (other.getNormalisationFactor() != 0D) { setNormalisationFactor(other.getNormalisationFactor()); } if (other.getWeightingFactor() != 0D) { setWeightingFactor(other.getWeightingFactor()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.openlca.proto.ProtoNwFactor parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.openlca.proto.ProtoNwFactor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private org.openlca.proto.ProtoRef impactCategory_; private com.google.protobuf.SingleFieldBuilderV3< org.openlca.proto.ProtoRef, org.openlca.proto.ProtoRef.Builder, org.openlca.proto.ProtoRefOrBuilder> impactCategoryBuilder_; /** * .protolca.ProtoRef impact_category = 1; * @return Whether the impactCategory field is set. */ public boolean hasImpactCategory() { return impactCategoryBuilder_ != null || impactCategory_ != null; } /** * .protolca.ProtoRef impact_category = 1; * @return The impactCategory. */ public org.openlca.proto.ProtoRef getImpactCategory() { if (impactCategoryBuilder_ == null) { return impactCategory_ == null ? org.openlca.proto.ProtoRef.getDefaultInstance() : impactCategory_; } else { return impactCategoryBuilder_.getMessage(); } } /** * .protolca.ProtoRef impact_category = 1; */ public Builder setImpactCategory(org.openlca.proto.ProtoRef value) { if (impactCategoryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } impactCategory_ = value; onChanged(); } else { impactCategoryBuilder_.setMessage(value); } return this; } /** * .protolca.ProtoRef impact_category = 1; */ public Builder setImpactCategory( org.openlca.proto.ProtoRef.Builder builderForValue) { if (impactCategoryBuilder_ == null) { impactCategory_ = builderForValue.build(); onChanged(); } else { impactCategoryBuilder_.setMessage(builderForValue.build()); } return this; } /** * .protolca.ProtoRef impact_category = 1; */ public Builder mergeImpactCategory(org.openlca.proto.ProtoRef value) { if (impactCategoryBuilder_ == null) { if (impactCategory_ != null) { impactCategory_ = org.openlca.proto.ProtoRef.newBuilder(impactCategory_).mergeFrom(value).buildPartial(); } else { impactCategory_ = value; } onChanged(); } else { impactCategoryBuilder_.mergeFrom(value); } return this; } /** * .protolca.ProtoRef impact_category = 1; */ public Builder clearImpactCategory() { if (impactCategoryBuilder_ == null) { impactCategory_ = null; onChanged(); } else { impactCategory_ = null; impactCategoryBuilder_ = null; } return this; } /** * .protolca.ProtoRef impact_category = 1; */ public org.openlca.proto.ProtoRef.Builder getImpactCategoryBuilder() { onChanged(); return getImpactCategoryFieldBuilder().getBuilder(); } /** * .protolca.ProtoRef impact_category = 1; */ public org.openlca.proto.ProtoRefOrBuilder getImpactCategoryOrBuilder() { if (impactCategoryBuilder_ != null) { return impactCategoryBuilder_.getMessageOrBuilder(); } else { return impactCategory_ == null ? org.openlca.proto.ProtoRef.getDefaultInstance() : impactCategory_; } } /** * .protolca.ProtoRef impact_category = 1; */ private com.google.protobuf.SingleFieldBuilderV3< org.openlca.proto.ProtoRef, org.openlca.proto.ProtoRef.Builder, org.openlca.proto.ProtoRefOrBuilder> getImpactCategoryFieldBuilder() { if (impactCategoryBuilder_ == null) { impactCategoryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.openlca.proto.ProtoRef, org.openlca.proto.ProtoRef.Builder, org.openlca.proto.ProtoRefOrBuilder>( getImpactCategory(), getParentForChildren(), isClean()); impactCategory_ = null; } return impactCategoryBuilder_; } private double normalisationFactor_ ; /** * double normalisation_factor = 2; * @return The normalisationFactor. */ @java.lang.Override public double getNormalisationFactor() { return normalisationFactor_; } /** * double normalisation_factor = 2; * @param value The normalisationFactor to set. * @return This builder for chaining. */ public Builder setNormalisationFactor(double value) { normalisationFactor_ = value; onChanged(); return this; } /** * double normalisation_factor = 2; * @return This builder for chaining. */ public Builder clearNormalisationFactor() { normalisationFactor_ = 0D; onChanged(); return this; } private double weightingFactor_ ; /** * double weighting_factor = 3; * @return The weightingFactor. */ @java.lang.Override public double getWeightingFactor() { return weightingFactor_; } /** * double weighting_factor = 3; * @param value The weightingFactor to set. * @return This builder for chaining. */ public Builder setWeightingFactor(double value) { weightingFactor_ = value; onChanged(); return this; } /** * double weighting_factor = 3; * @return This builder for chaining. */ public Builder clearWeightingFactor() { weightingFactor_ = 0D; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:protolca.ProtoNwFactor) } // @@protoc_insertion_point(class_scope:protolca.ProtoNwFactor) private static final org.openlca.proto.ProtoNwFactor DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.openlca.proto.ProtoNwFactor(); } public static org.openlca.proto.ProtoNwFactor getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ProtoNwFactor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ProtoNwFactor(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.openlca.proto.ProtoNwFactor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy