FormatFamilyBase

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.IEquatable

public abstract class FormatFamilyBase implements System.IEquatable<FormatFamilyBase>

Represents the base class for format families, providing common functionality for format family instances.



This class is abstract and must be inherited by a derived class that specifies the actual format family details.


Methods

Method Description
getId() Gets the unique identifier for the format family.
getName() Gets the name of the format family.
equals(FormatFamilyBase other) Determines whether this instance is equal to the specified FormatFamilyBase instance.
toString() Returns a string that represents the current object.
getAll(Class clazz) Retrieves all instances of the specified type
T
that derive from FormatFamilyBase.
equals(Object obj) Determines whether this instance is equal to the specified FormatFamilyBase instance.
hashCode() Returns a hash code for the current object.
fromValue(Class clazz, int value) Retrieves an instance of the specified type
T
that has the specified identifier.
fromName(Class clazz, String name) Retrieves an instance of the specified type
T
that has the specified name.
areEqual(FormatFamilyBase first, FormatFamilyBase second) Determines whether two FormatFamilyBase instances are equal.
areNotEqual(FormatFamilyBase first, FormatFamilyBase second) Determines whether two FormatFamilyBase instances are not equal.
equalsName(FormatFamilyBase first, String name) Determines whether a FormatFamilyBase instance is equal to a specified string name.
notEqualsName(FormatFamilyBase first, String name) Determines whether a FormatFamilyBase instance is not equal to a specified string name.
toInt(FormatFamilyBase family) Converts a FormatFamilyBase instance to an integer implicitly.
toString(FormatFamilyBase family) Converts a FormatFamilyBase instance to a string implicitly.
fromName(String family) Converts a string representing a format family name to a FormatFamilyBase object.
fromId(int id) Converts an integer representing a format family ID to a FormatFamilyBase object.

getId()

public final int getId()

Gets the unique identifier for the format family.

Returns: int

getName()

public final String getName()

Gets the name of the format family.

Returns: java.lang.String

equals(FormatFamilyBase other)

public final boolean equals(FormatFamilyBase other)

Determines whether this instance is equal to the specified FormatFamilyBase instance.

Parameters:

Parameter Type Description
other FormatFamilyBase The FormatFamilyBase instance to compare with the current instance.

Returns: boolean - true if the specified FormatFamilyBase is equal to the current instance; otherwise, false .

toString()

public String toString()

Returns a string that represents the current object.

Returns: java.lang.String - A string that represents the current object, which is the value of the Name property.



This method overrides object.ToString to return the Name property of the object.


getAll(Class clazz)

public static List<T> <T>getAll(Class<T> clazz)

Retrieves all instances of the specified type T that derive from FormatFamilyBase.

Parameters:

Parameter Type Description
clazz java.lang.Class

Returns: java.util.List - An enumerable collection of instances of the specified type T .

T
The type of format family.

equals(Object obj)

public boolean equals(Object obj)

Determines whether this instance is equal to the specified FormatFamilyBase instance.

Parameters:

Parameter Type Description
obj java.lang.Object The FormatFamilyBase instance to compare with the current instance.

Returns: boolean - true if the specified FormatFamilyBase is equal to the current instance; otherwise, false .

hashCode()

public int hashCode()

Returns a hash code for the current object.

Returns: int - A hash code for the current object, suitable for use in hashing algorithms and data structures like a hash table.



This method overrides object.GetHashCode . The hash code is computed using the object’s Id and Name properties. The unchecked context allows overflow, which is acceptable in a hash code calculation context.


fromValue(Class clazz, int value)

public static T <T>fromValue(Class<T> clazz, int value)

Retrieves an instance of the specified type T that has the specified identifier.

Parameters:

Parameter Type Description
clazz java.lang.Class
value int The identifier of the format family.
T
The type of format family. |

Returns: T - An instance of the specified type T with the specified identifier.

fromName(Class clazz, String name)

public static T <T>fromName(Class<T> clazz, String name)

Retrieves an instance of the specified type T that has the specified name.

Parameters:

Parameter Type Description
clazz java.lang.Class
name java.lang.String The name of the format family.
T
The type of format family. |

Returns: T - An instance of the specified type T with the specified name.

areEqual(FormatFamilyBase first, FormatFamilyBase second)

public static boolean areEqual(FormatFamilyBase first, FormatFamilyBase second)

Determines whether two FormatFamilyBase instances are equal.

Parameters:

Parameter Type Description
first FormatFamilyBase The first FormatFamilyBase instance to compare.
second FormatFamilyBase The second FormatFamilyBase instance to compare.

Returns: boolean - true if the two FormatFamilyBase instances are equal; otherwise, false.

areNotEqual(FormatFamilyBase first, FormatFamilyBase second)

public static boolean areNotEqual(FormatFamilyBase first, FormatFamilyBase second)

Determines whether two FormatFamilyBase instances are not equal.

Parameters:

Parameter Type Description
first FormatFamilyBase The first FormatFamilyBase instance to compare.
second FormatFamilyBase The second FormatFamilyBase instance to compare.

Returns: boolean - true if the two FormatFamilyBase instances are not equal; otherwise, false.

equalsName(FormatFamilyBase first, String name)

public static boolean equalsName(FormatFamilyBase first, String name)

Determines whether a FormatFamilyBase instance is equal to a specified string name.

Parameters:

Parameter Type Description
first FormatFamilyBase The FormatFamilyBase instance to compare.
name java.lang.String The string name to compare with the FormatFamilyBase instance.

Returns: boolean - true if the FormatFamilyBase instance’s name is equal to the specified string name; otherwise, false.

notEqualsName(FormatFamilyBase first, String name)

public static boolean notEqualsName(FormatFamilyBase first, String name)

Determines whether a FormatFamilyBase instance is not equal to a specified string name.

Parameters:

Parameter Type Description
first FormatFamilyBase The FormatFamilyBase instance to compare.
name java.lang.String The string name to compare with the FormatFamilyBase instance.

Returns: boolean - true if the FormatFamilyBase instance’s name is not equal to the specified string name; otherwise, false.

toInt(FormatFamilyBase family)

public static int toInt(FormatFamilyBase family)

Converts a FormatFamilyBase instance to an integer implicitly.

Parameters:

Parameter Type Description
family FormatFamilyBase The FormatFamilyBase instance to convert.

Returns: int - The unique identifier of the FormatFamilyBase instance.

toString(FormatFamilyBase family)

public static String toString(FormatFamilyBase family)

Converts a FormatFamilyBase instance to a string implicitly.

Parameters:

Parameter Type Description
family FormatFamilyBase The FormatFamilyBase instance to convert.

Returns: java.lang.String - The name of the FormatFamilyBase instance.

fromName(String family)

public static FormatFamilyBase fromName(String family)

Converts a string representing a format family name to a FormatFamilyBase object.

Parameters:

Parameter Type Description
family java.lang.String The name of the format family to convert.

Returns: FormatFamilyBase - A FormatFamilyBase object corresponding to the specified format family name.

fromId(int id)

public static FormatFamilyBase fromId(int id)

Converts an integer representing a format family ID to a FormatFamilyBase object.

Parameters:

Parameter Type Description
id int The ID of the format family to convert.

Returns: FormatFamilyBase - A FormatFamilyBase object corresponding to the specified format family ID.