## com.thingmagic
Class TagData

    java.lang.Object
      com.thingmagic.TagData

All Implemented Interfaces:
  TagFilter

Direct Known Subclasses:
  Ata.TagData, Gen2.TagData, Ipx256.TagData, Ipx64.TagData, Iso180006b.TagData, Iso180006bUcode.TagData

    public class TagData

extends java.lang.Object
implements TagFilter

A class to represent RFID tags. Instances of this class are immutable.

Constructor Summary
`TagData(byte[] epc)` Construct a tag object representing the specified EPC
`TagData(byte[] epc, byte[] crc)` Construct a tag object representing the specified EPC
`TagData(java.lang.String epc)` Construct a tag object representing the specified EPC (no CRC)
`TagData(java.lang.String epc, java.lang.String crc)` Construct a tag object representing the specified EPC and CRC

Method Summary
`byte[]` `crcBytes()` Returns this tag's CRC.
`byte[]` `epcBytes()` Returns this tag's EPC.
`java.lang.String` `epcString()` Returns a hexadecimal string version of this tag's EPC.
`boolean` `equals(java.lang.Object obj)` Compares the specified Object with this TagData for equality.
`TagProtocol` `getProtocol()` Returns the protocol of this tag.
`int` `hashCode()` Returns the hash code value for this TagData.
`boolean` `matches(TagData t)` Test if a tag matches this filter.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TagData

    public TagData(byte[] epc)

  Construct a tag object representing the specified EPC

  Parameters:
    `epc` - the bytes representing the EPC

### TagData

    public TagData(byte[] epc,
                   byte[] crc)

  Construct a tag object representing the specified EPC

  Parameters:
    `epc` - the bytes representing the EPC
    `crc` - the bytes representing the CRC

### TagData

    public TagData(java.lang.String epc,
                   java.lang.String crc)

  Construct a tag object representing the specified EPC and CRC

  Parameters:
    `epc` - a hexadecimal string representing the EPC
    `crc` - a hexadecimal string representing the CRC

### TagData

    public TagData(java.lang.String epc)

  Construct a tag object representing the specified EPC (no CRC)

  Parameters:
    `epc` - a hexadecimal string representing the EPC

Method Detail

### epcString

    public java.lang.String epcString()

  Returns a hexadecimal string version of this tag's EPC.

  Returns:
    a string representation of the EPC.

### epcBytes

    public byte[] epcBytes()

  Returns this tag's EPC.

  Returns:
    an array containing the bytes of the EPC

### crcBytes

    public byte[] crcBytes()

  Returns this tag's CRC.

  Returns:
    an array containing the bytes of the CRC

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getProtocol

    public TagProtocol getProtocol()

  Returns the protocol of this tag.

### equals

    public boolean equals(java.lang.Object obj)

  Compares the specified Object with this TagData for equality. Returns true if and only if the specified Object is also a TagData with the same protocol and EPC.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the Object to be compared for equality with this TagData
  Returns:
    true if the specified Object is equal to this TagData

### hashCode

    public int hashCode()

  Returns the hash code value for this TagData.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    the hash code value for this TagData.

### matches

    public boolean matches(TagData t)

  Description copied from interface: `TagFilter`
  Test if a tag matches this filter. Only applies to selects based on the EPC.

  Specified by:
    `matches` in interface `TagFilter`