コード例 #1
0
  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;

    result = prime * result + ((value == null) ? 0 : value.hashCode());
    result = prime * result + ((mask == null) ? 0 : mask.hashCode());
    return result;
  }
コード例 #2
0
    @Override
    public OFOxmBsnUdf1Masked readFrom(ChannelBuffer bb) throws OFParseError {
      // fixed value property typeLen == 0x31308L
      int typeLen = bb.readInt();
      if (typeLen != 0x31308)
        throw new OFParseError("Wrong typeLen: Expected=0x31308L(0x31308L), got=" + typeLen);
      UDF value = UDF.read4Bytes(bb);
      UDF mask = UDF.read4Bytes(bb);

      OFOxmBsnUdf1MaskedVer12 oxmBsnUdf1MaskedVer12 = new OFOxmBsnUdf1MaskedVer12(value, mask);
      if (logger.isTraceEnabled()) logger.trace("readFrom - read={}", oxmBsnUdf1MaskedVer12);
      return oxmBsnUdf1MaskedVer12;
    }
コード例 #3
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;
    OFOxmBsnUdf1MaskedVer12 other = (OFOxmBsnUdf1MaskedVer12) obj;

    if (value == null) {
      if (other.value != null) return false;
    } else if (!value.equals(other.value)) return false;
    if (mask == null) {
      if (other.mask != null) return false;
    } else if (!mask.equals(other.mask)) return false;
    return true;
  }
コード例 #4
0
    @Override
    public OFOxmBsnUdf1 readFrom(ByteBuf bb) throws OFParseError {
      // fixed value property typeLen == 0x31204L
      int typeLen = bb.readInt();
      if (typeLen != 0x31204)
        throw new OFParseError("Wrong typeLen: Expected=0x31204L(0x31204L), got=" + typeLen);
      UDF value = UDF.read4Bytes(bb);

      OFOxmBsnUdf1Ver12 oxmBsnUdf1Ver12 = new OFOxmBsnUdf1Ver12(value);
      if (logger.isTraceEnabled()) logger.trace("readFrom - read={}", oxmBsnUdf1Ver12);
      return oxmBsnUdf1Ver12;
    }