~ubuntu-branches/ubuntu/karmic/tuxguitar/karmic

« back to all changes in this revision

Viewing changes to src/org/herac/tuxguitar/song/models/Lyric.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mfrom: (1.1.1 upstream) (2.1.3 hardy)
  • Revision ID: james.westby@ubuntu.com-20080619003030-agens2gvd5m4dacu
New upstream release (Closes: #481728) also (LP: #176979, #212207)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.herac.tuxguitar.song.models;
2
 
 
3
 
public class Lyric {
4
 
        private static final String REGEX = " ";
5
 
        
6
 
        private int from;
7
 
        private String lyrics;
8
 
        
9
 
        public Lyric(){
10
 
                this(1,"");
11
 
        }
12
 
        
13
 
        public Lyric(int from,String lyrics){
14
 
                this.from = from;
15
 
                this.lyrics = lyrics;
16
 
        }
17
 
        
18
 
        public int getFrom() {
19
 
                return from;
20
 
        }
21
 
        
22
 
        public void setFrom(int from) {
23
 
                this.from = from;
24
 
        }
25
 
 
26
 
        public String getLyrics() {
27
 
                return lyrics;
28
 
        }
29
 
 
30
 
        public void setLyrics(String lyrics) {
31
 
                this.lyrics = lyrics;
32
 
        }
33
 
                
34
 
        public String[] getLyricBeats(){
35
 
                return getLyrics().split(REGEX);
36
 
        }
37
 
        
38
 
        public boolean isEmpty(){
39
 
                return (getLyrics().length() == 0);
40
 
        }
41
 
}