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 aGoVerSet
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the specified version is present in the set.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
Returns true if the set contains no versionsstatic GoVerSet
Parses a version list string (eg.ranges()
Returns the value of theranges
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
ALL
-
-
Constructor Details
-
GoVerSet
Creates an instance of aGoVerSet
record class.- Parameters:
ranges
- the value for theranges
record component
-
-
Method Details
-
parse
Parses a version list string (eg. "all", or "1.0-1.5,1.8-1.9,1.11-") and returns aGoVerSet
containing the found versions.- Parameters:
s
- string to parse- Returns:
GoVerSet
containing 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
-GoVer
to 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 theranges
record component.- Returns:
- the value of the
ranges
record component
-