com.osohq.oso.Pattern Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oso Show documentation
Show all versions of oso Show documentation
oso authorization library.
package com.osohq.oso;
import java.util.HashMap;
import java.util.Objects;
public class Pattern {
private String tag; // nullable
private HashMap fields;
public Pattern(String tag, HashMap fields) {
this.tag = tag;
this.fields = fields;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public HashMap getFields() {
return fields;
}
public void setFields(HashMap fields) {
this.fields = fields;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pattern pattern = (Pattern) o;
return Objects.equals(tag, pattern.tag) && fields.equals(pattern.fields);
}
@Override
public int hashCode() {
return Objects.hash(tag, fields);
}
}