summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/ConstantDefinition.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-12-01 23:24:30 +0100
committerMichael Bien <[email protected]>2009-12-01 23:24:30 +0100
commitb0758ce498793c5e130493d9a03d7632de152855 (patch)
tree2597fa7f1e10dea4ffebff383ec830988460361d /src/java/com/sun/gluegen/ConstantDefinition.java
parent0a5bc7f5a379b52cf5fe6bb9ea22f59fdec1fff0 (diff)
Code cleanup. Ported package com.sun.gluegen to java 5 language level.
Diffstat (limited to 'src/java/com/sun/gluegen/ConstantDefinition.java')
-rw-r--r--src/java/com/sun/gluegen/ConstantDefinition.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/java/com/sun/gluegen/ConstantDefinition.java b/src/java/com/sun/gluegen/ConstantDefinition.java
index 44ce8e0..e4cb3f5 100644
--- a/src/java/com/sun/gluegen/ConstantDefinition.java
+++ b/src/java/com/sun/gluegen/ConstantDefinition.java
@@ -38,13 +38,14 @@ import java.util.*;
/** Represents the definition of a constant which was provided either
via a #define statement or through an enum definition. */
public class ConstantDefinition {
+
private String origName;
- private HashSet aliasedNames;
+ private HashSet<String> aliasedNames;
private String name;
private String value;
private boolean isEnum;
private String enumName;
- private Set/*<String>*/ aliases;
+ private Set<String> aliases;
public ConstantDefinition(String name,
String value,
@@ -55,7 +56,7 @@ public class ConstantDefinition {
this.value = value;
this.isEnum = isEnum;
this.enumName = enumName;
- this.aliasedNames=new HashSet();
+ this.aliasedNames=new HashSet<String>();
}
public boolean equals(ConstantDefinition other) {
@@ -75,6 +76,7 @@ public class ConstantDefinition {
return s1.equals(s2);
}
+ @Override
public int hashCode() {
return name.hashCode();
}
@@ -90,7 +92,7 @@ public class ConstantDefinition {
public void addAliasedName(String name) {
aliasedNames.add(name);
}
- public Collection getAliasedNames() {
+ public Collection<String> getAliasedNames() {
return aliasedNames;
}
@@ -109,13 +111,13 @@ public class ConstantDefinition {
public boolean isEnum() { return isEnum; }
- public Set/*<String>*/ getAliases() {
+ public Set<String> getAliases() {
return aliases;
}
public void addAlias(String alias) {
if (aliases == null) {
- aliases = new LinkedHashSet/*<String>*/();
+ aliases = new LinkedHashSet<String>();
}
aliases.add(alias);
}