/ictclas4j/src/org/ictclas4j/bean/AdjoiningPos.java

http://ictclas4j.googlecode.com/ · Java · 88 lines · 54 code · 27 blank · 7 comment · 0 complexity · 025352439cc0b251c19cb9a9490fa577 MD5 · raw file

  1. package org.ictclas4j.bean;
  2. import java.io.Serializable;
  3. /**
  4. * ??????
  5. *
  6. * @author sinboy
  7. * @since 2007.5.22
  8. *
  9. */
  10. public class AdjoiningPos implements Cloneable, Serializable{
  11. private Pos pos;// ????
  12. private double value; // ???
  13. private int prev;// ?????N?????????????????????
  14. private boolean isBest;
  15. private static final long serialVersionUID = 10000L;
  16. public AdjoiningPos() {
  17. }
  18. public AdjoiningPos(int tag,double value) {
  19. this.pos=new Pos();
  20. this.pos.setTag(tag);
  21. this.value=value;
  22. }
  23. public AdjoiningPos(Pos pos, double value) {
  24. this.pos = pos;
  25. this.value = value;
  26. }
  27. public Pos getPos() {
  28. return pos;
  29. }
  30. public void setPos(Pos pos) {
  31. this.pos = pos;
  32. }
  33. public double getValue() {
  34. return value;
  35. }
  36. public void setValue(double value) {
  37. this.value = value;
  38. }
  39. public int getPrev() {
  40. return prev;
  41. }
  42. public void setPrev(int prevPos) {
  43. this.prev = prevPos;
  44. }
  45. public boolean isBest() {
  46. return isBest;
  47. }
  48. public void setBest(boolean isBest) {
  49. this.isBest = isBest;
  50. }
  51. public String toString() {
  52. StringBuffer sb = new StringBuffer();
  53. sb.append("pos:").append(pos);
  54. sb.append(",values:").append(value);
  55. sb.append(",isBest:").append(isBest);
  56. return sb.toString();
  57. }
  58. public AdjoiningPos clone() throws CloneNotSupportedException {
  59. return (AdjoiningPos) super.clone();
  60. }
  61. }