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

com.devsmart.ubjson.UBArray Maven / Gradle / Ivy

package com.devsmart.ubjson;


public class UBArray extends UBValue {

    public enum ArrayType {
        Generic,
        Int8,
        Int16,
        Int32,
        Int64,
        Float32,
        Float64,
        String
    }

    private UBValue[] mValue;

    UBArray() {

    }

    UBArray(UBValue[] value) {
        mValue = value;
    }

    @Override
    public Type getType() {
        return Type.Array;
    }

    public boolean isStronglyTyped() {
        return false;
    }

    public ArrayType getStrongType() {
        return ArrayType.Generic;
    }

    public int size() {
        return mValue.length;
    }

    public UBValue get(int index) {
        return mValue[index];
    }

    @Override
    public int hashCode() {
        int retval = 0;
        final int size = size();
        for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy