Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
markov
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Patrick Friedel
markov
Commits
bfb28c5a
Commit
bfb28c5a
authored
Feb 17, 2018
by
Hut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added glyph
parent
c071d812
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
Glyph.java
src/main/java/markov/Glyph.java
+50
-0
No files found.
src/main/java/markov/Glyph.java
0 → 100644
View file @
bfb28c5a
package
markov
;
public
class
Glyph
{
public
enum
Type
{
word
,
interpunction
,
control
,
whitespace
}
private
Type
type
;
private
String
content
;
public
Type
getType
()
{
return
type
;
}
public
String
getContent
()
{
return
content
;
}
public
Glyph
(
Type
type
,
String
content
)
{
this
.
type
=
type
;
this
.
content
=
content
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
Glyph
glyph
=
(
Glyph
)
o
;
if
(
type
!=
glyph
.
type
)
return
false
;
return
content
!=
null
?
content
.
equals
(
glyph
.
content
)
:
glyph
.
content
==
null
;
}
@Override
public
int
hashCode
()
{
int
result
=
type
!=
null
?
type
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
content
!=
null
?
content
.
hashCode
()
:
0
);
return
result
;
}
@Override
public
String
toString
()
{
return
"Glyph{"
+
"type="
+
type
+
", content='"
+
content
+
'\''
+
'}'
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment