X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.server.io%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Fio%2FSimpleFont.java;fp=bundles%2Forg.simantics.document.server.io%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Fio%2FSimpleFont.java;h=532d1dd9d288fa88361ac021d169e0efcc6050f9;hp=b0539516c7062f94e789909579d0ef541d06614f;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/SimpleFont.java b/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/SimpleFont.java index b0539516c..532d1dd9d 100644 --- a/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/SimpleFont.java +++ b/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/SimpleFont.java @@ -1,64 +1,64 @@ -package org.simantics.document.server.io; - -public class SimpleFont implements IFont { - - private final String family; - private final String style; - private final int height; - - public SimpleFont(String family, String style, int height) { - this.family = family; - this.style = style; - this.height = height; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((family == null) ? 0 : family.hashCode()); - result = prime * result + height; - result = prime * result + ((style == null) ? 0 : style.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - SimpleFont other = (SimpleFont) obj; - if (family == null) { - if (other.family != null) - return false; - } else if (!family.equals(other.family)) - return false; - if (height != other.height) - return false; - if (style == null) { - if (other.style != null) - return false; - } else if (!style.equals(other.style)) - return false; - return true; - } - - @Override - public String getFamily() { - return family; - } - - @Override - public String getStyle() { - return style; - } - - @Override - public int getHeight() { - return height; - } - -} +package org.simantics.document.server.io; + +public class SimpleFont implements IFont { + + private final String family; + private final String style; + private final int height; + + public SimpleFont(String family, String style, int height) { + this.family = family; + this.style = style; + this.height = height; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((family == null) ? 0 : family.hashCode()); + result = prime * result + height; + result = prime * result + ((style == null) ? 0 : style.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + SimpleFont other = (SimpleFont) obj; + if (family == null) { + if (other.family != null) + return false; + } else if (!family.equals(other.family)) + return false; + if (height != other.height) + return false; + if (style == null) { + if (other.style != null) + return false; + } else if (!style.equals(other.style)) + return false; + return true; + } + + @Override + public String getFamily() { + return family; + } + + @Override + public String getStyle() { + return style; + } + + @Override + public int getHeight() { + return height; + } + +}