Sha256: 5bd3913959cc9bd21843ba70af0733487980be5a80c639ae749bb3b82003b996

Contents?: true

Size: 850 Bytes

Versions: 12

Compression:

Stored size: 850 Bytes

Contents

package org.cx4a.rsense.typing.annotation;

public class TypeVariable implements TypeExpression {
    private String name;

    public TypeVariable(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Type getType() {
        return Type.VARIABLE;
    }

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

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

    @Override
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }

        if (!(other instanceof TypeVariable)) {
            return false;
        }

        return name.equals(((TypeVariable) other).name);
    }

    public static TypeVariable valueOf(String name) {
        return new TypeVariable(name);
    }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rsense-core-0.6.6 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.6.5 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.6.4 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.6.2 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.6.1 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.6.0 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.9 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.8 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.6 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.2 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.1 src/org/cx4a/rsense/typing/annotation/TypeVariable.java
rsense-core-0.5.0 src/org/cx4a/rsense/typing/annotation/TypeVariable.java