Skip to content

Commit

Permalink
Merge 182452a into 1996deb
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrberzi committed Jun 5, 2015
2 parents 1996deb + 182452a commit fd69c30
Show file tree
Hide file tree
Showing 5 changed files with 914 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ targetCompatibility = 1.8

group = "org.manifold"
// name = "manifold-core"
version = '0.10.0-SNAPSHOT'
version = '0.11.0-SNAPSHOT'

jar {
manifest {
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/manifold/compiler/Attributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
public class Attributes {
private final Map<String, Value> data;

@Override
public boolean equals(Object aThat) {
if (this == aThat) {
return true;
}
if (!(aThat instanceof Attributes)) {
return false;
}
Attributes that = (Attributes) aThat;
return (this.getAll().equals(that.getAll()));
}

public Attributes(Map<String, Value> data) {
this.data = ImmutableMap.copyOf(data);
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/manifold/compiler/InferredTypeValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public String toString() {
return "Inferred(" + elementType + ")";
}

@Override
public boolean isSubtypeOf(TypeValue other) {
if (!(other instanceof InferredTypeValue)) {
return false;
}
InferredTypeValue otherType = (InferredTypeValue) other;
return (this.getInferredType().isSubtypeOf(otherType.getInferredType()));
}

@Override
public Value instantiate(JsonElement element) {
if (element.isJsonNull()) {
Expand Down

0 comments on commit fd69c30

Please sign in to comment.