Record Class GoVerSet
java.lang.Object
java.lang.Record
ghidra.app.util.bin.format.golang.GoVerSet
- Record Components:
ranges- list of ranges that define the set
Represents a set of version numbers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGoVerSet(List<GoVerRange> ranges) Creates an instance of aGoVerSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the specified version is present in the set.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns true if the set contains no versionsstatic GoVerSetParses a version list string (eg.ranges()Returns the value of therangesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ALL
-
-
Constructor Details
-
GoVerSet
Creates an instance of aGoVerSetrecord class.- Parameters:
ranges- the value for therangesrecord component
-
-
Method Details
-
parse
Parses a version list string (eg. "all", or "1.0-1.5,1.8-1.9,1.11-") and returns aGoVerSetcontaining the found versions.- Parameters:
s- string to parse- Returns:
GoVerSetcontaining the found versions- Throws:
IOException- if the string had invalid start or end wildcard ranges
-
isEmpty
public boolean isEmpty()Returns true if the set contains no versions- Returns:
- boolean true if empty
-
contains
Returns true if the specified version is present in the set.- Parameters:
ver-GoVerto search for- Returns:
- boolean true if version is present
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ranges
Returns the value of therangesrecord component.- Returns:
- the value of the
rangesrecord component
-