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

com.amazonaws.kinesisvideo.parser.ebml.EBMLElementMetaData Maven / Gradle / Ivy

Go to download

The Amazon Kinesis Video Streams Parser Library for Java enables Java developers to parse the streams returned by GetMedia calls to Amazon Kinesis Video.

There is a newer version: 1.2.5
Show newest version
// Generated by delombok at Mon Mar 05 19:46:45 UTC 2018
/*
Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). 
You may not use this file except in compliance with the License. 
A copy of the License is located at

   http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. 
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
*/
package com.amazonaws.kinesisvideo.parser.ebml;

/**
 * Class that represents the metadata of a single EBML element in an EBML stream.
 * It does not contain the actual data or content of the EBML element.
 */
public class EBMLElementMetaData {
    private final EBMLTypeInfo typeInfo;
    private final long elementNumber;

    public boolean isMaster() {
        return typeInfo.getType() == EBMLTypeInfo.TYPE.MASTER;
    }

    @java.beans.ConstructorProperties({"typeInfo", "elementNumber"})
    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    EBMLElementMetaData(final EBMLTypeInfo typeInfo, final long elementNumber) {
        this.typeInfo = typeInfo;
        this.elementNumber = elementNumber;
    }


    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public static class EBMLElementMetaDataBuilder {
        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private EBMLTypeInfo typeInfo;
        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private long elementNumber;

        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        EBMLElementMetaDataBuilder() {
        }

        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public EBMLElementMetaDataBuilder typeInfo(final EBMLTypeInfo typeInfo) {
            this.typeInfo = typeInfo;
            return this;
        }

        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public EBMLElementMetaDataBuilder elementNumber(final long elementNumber) {
            this.elementNumber = elementNumber;
            return this;
        }

        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public EBMLElementMetaData build() {
            return new EBMLElementMetaData(typeInfo, elementNumber);
        }

        @Override
        @SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public String toString() {
            return "EBMLElementMetaData.EBMLElementMetaDataBuilder(typeInfo=" + this.typeInfo + ", elementNumber=" + this.elementNumber + ")";
        }
    }

    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public static EBMLElementMetaDataBuilder builder() {
        return new EBMLElementMetaDataBuilder();
    }

    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public EBMLTypeInfo getTypeInfo() {
        return this.typeInfo;
    }

    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public long getElementNumber() {
        return this.elementNumber;
    }

    @Override
    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public String toString() {
        return "EBMLElementMetaData(typeInfo=" + this.getTypeInfo() + ", elementNumber=" + this.getElementNumber() + ")";
    }

    @Override
    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof EBMLElementMetaData)) return false;
        final EBMLElementMetaData other = (EBMLElementMetaData) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$typeInfo = this.getTypeInfo();
        final Object other$typeInfo = other.getTypeInfo();
        if (this$typeInfo == null ? other$typeInfo != null : !this$typeInfo.equals(other$typeInfo)) return false;
        if (this.getElementNumber() != other.getElementNumber()) return false;
        return true;
    }

    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    protected boolean canEqual(final Object other) {
        return other instanceof EBMLElementMetaData;
    }

    @Override
    @SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $typeInfo = this.getTypeInfo();
        result = result * PRIME + ($typeInfo == null ? 43 : $typeInfo.hashCode());
        final long $elementNumber = this.getElementNumber();
        result = result * PRIME + (int) ($elementNumber >>> 32 ^ $elementNumber);
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy