Created
October 16, 2022 12:34
-
-
Save selvamani-k-8445/e30caa4cba826d8881aa8f58e5cda7c2 to your computer and use it in GitHub Desktop.
Flyweight
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package FlyWeight; | |
import java.util.Objects; | |
public class CellProperty { | |
private final String fontFamily; | |
private final int fontSize; | |
private final boolean isBold; | |
CellProperty(String fontFamily,int fontSize,boolean isBold){ | |
this.fontFamily = fontFamily; | |
this.fontSize = fontSize; | |
this.isBold = isBold; | |
} | |
@Override | |
public int hashCode() { | |
return Objects.hash(fontFamily,fontSize,isBold); | |
} | |
@Override | |
public String toString() { | |
return fontFamily+" "+" size : "+fontSize + " isBold : "+isBold; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment