Sha256: 4a20fe3d4c2e4a438e06c42d5cac495f16afa47bed34b75d2a299e7d68baf2f2

Contents?: true

Size: 1.1 KB

Versions: 153

Compression:

Stored size: 1.1 KB

Contents

package org.embulk.spi.type;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public abstract class AbstractType
        implements Type
{
    private final String name;
    private final Class<?> javaType;
    private byte fixedStorageSize;

    protected AbstractType(String name, Class<?> javaType, int fixedStorageSize)
    {
        this.name = name;
        this.javaType = javaType;
        this.fixedStorageSize = (byte) fixedStorageSize;
    }

    @Override
    public String getName()
    {
        return name;
    }

    @Override
    public Class<?> getJavaType()
    {
        return javaType;
    }

    @Override
    public byte getFixedStorageSize()
    {
        return fixedStorageSize;
    }

    @SuppressFBWarnings(value = "EQ_UNUSUAL")
    @Override
    public boolean equals(Object o)
    {
        if (o == null) {
            return false;
        }
        return o.getClass().isAssignableFrom(getClass());
    }

    @Override
    public int hashCode()
    {
        return getClass().hashCode();
    }

    @Override
    public String toString()
    {
        return name;
    }
}

Version data entries

153 entries across 153 versions & 1 rubygems

Version Path
embulk-0.8.39 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.39-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.38 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.38-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.37 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.37-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.36 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.36-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.35 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.35-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.34 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.34-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.33 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.33-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.32 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.32-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.31 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.31-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.30 embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java
embulk-0.8.30-java embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java