Package com.uc4.api
Class UC4Alias
- java.lang.Object
-
- com.uc4.api.UC4Alias
-
public class UC4Alias extends java.lang.Object
This class stores a valid alias. The method toString() of this class can be used to get the alias as String
-
-
Constructor Summary
Constructors Constructor Description UC4Alias(java.lang.String name)
Creates a new alias.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UC4Alias
aliasOf(java.lang.String value)
Creates an alias from a String value.boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
EMPTY
public static final UC4Alias EMPTY
Represents an empty UC4Alias.
-
-
Constructor Detail
-
UC4Alias
public UC4Alias(java.lang.String name)
Creates a new alias.- Parameters:
name
- Name of the Object- Throws:
InvalidUC4NameException
- If the name has more than 200 characters.
-
-
Method Detail
-
aliasOf
public static UC4Alias aliasOf(java.lang.String value)
Creates an alias from a String value. If input value is not valid then an empty UC4Alias is returned.- Parameters:
value
- input value- Returns:
- a UC4Alias which is empty if input is not valid.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-