Class LongSegment

java.lang.Object
com.pnfsoftware.jeb.util.collect.LongSegment
All Implemented Interfaces:
ISegment<Long>, Comparable<LongSegment>

@Ser public class LongSegment extends Object implements ISegment<Long>, Comparable<LongSegment>
Standard implementation of a segment using an long treated as a signed value. Immutable.
  • Constructor Details

    • LongSegment

      public LongSegment(long address, long size)
  • Method Details

    • compareTo

      public int compareTo(LongSegment second)
      Specified by:
      compareTo in interface Comparable<LongSegment>
    • getBegin

      public Long getBegin()
      Description copied from interface: ISegment
      Get the address where the segment starts.
      Specified by:
      getBegin in interface ISegment<Long>
      Returns:
      the address where the segment begins
    • getEnd

      public Long getEnd()
      Description copied from interface: ISegment
      Get the address where the segment ends (exclusive).
      Specified by:
      getEnd in interface ISegment<Long>
      Returns:
      the address where the segment ends
    • getSize

      public long getSize()
    • toString

      public String toString()
      Overrides:
      toString in class Object