@Override public boolean equals(Object o) { if ( o==null ) { return false; } if ( this == o ) { return true; // equals if same object } // labels must be the same even if epsilon or set or sempred etc... if ( label!=((Label)o).label ) { return false; } if ( label==SET ) { return this.labelSet.equals(((Label)o).labelSet); } return true; // label values are same, so true }
@Override public boolean equals(Object o) { if ( o==null ) { return false; } if ( this == o ) { return true; // equals if same object } // labels must be the same even if epsilon or set or sempred etc... if ( label!=((Label)o).label ) { return false; } if ( label==SET ) { return this.labelSet.equals(((Label)o).labelSet); } return true; // label values are same, so true }
/**Is this contained within a? */ public boolean subset(BitSet a) { if (a == null) return false; return this.and(a).equals(this); }
/**Is this contained within a? */ public boolean subset(BitSet a) { if (a == null) return false; return this.and(a).equals(this); }