Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Ferma
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oleksandr Porunov
Ferma
Commits
bfdb984a
Commit
bfdb984a
authored
7 years ago
by
Jeffrey Phillips Freeman
Browse files
Options
Downloads
Patches
Plain Diff
New translations property.md (Afrikaans)
parent
298ae047
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
af/property.md
+129
-0
129 additions, 0 deletions
af/property.md
with
129 additions
and
0 deletions
af/property.md
0 → 100644
+
129
−
0
View file @
bfdb984a
Valid on frames:
**Edge**
and
**Vertex**
Allowed prefixes when operation is AUTO:
`get`
,
`is`
,
`can`
,
`set`
,
`remove`
Annotation arguments:
`value`
- The name of the property
`operation`
- The operation the method will perform. Must be one of the following:
`GET`
,
`SET`
,
`REMOVE`
,
`AUTO`
. Defaults to
`AUTO`
.
The following would bind the method it is used on to the property named
`foo`
:
```
java
@Property
(
"foo"
)
//Method declared here
```
## GET Operation
Valid method signatures:
`( )`
### Signature: `( )`
Valid return types:
`Object`
or any primitive.
Get the property value of an element. Used when property is not a boolean value.
example:
```
java
@Property
(
"Foo"
)
Bar
getFoobar
();
```
```
java
@Property
(
"Foo"
)
<
E
extends
Bar
>
E
getFoobar
();
```
```
java
@Property
(
"Foo"
)
<
E
>
E
getFoobar
();
```
```
java
@Property
(
value
=
"Foo"
,
operation
=
Property
.
Operation
.
GET
)
Bar
obtainFoobar
();
```
## GET Operation (is prefix)
Valid method signatures:
`( )`
### Signature: `( )`
Valid return types:
`boolean`
Get the property value of an element. Used when property is a boolean value.
example:
```
java
@Property
(
"Foobared"
)
boolean
isFoobared
();
```
```
java
@Property
(
value
=
"Foo"
,
operation
=
Property
.
Operation
.
GET
)
boolean
obtainFoobared
();
```
## SET Operation
Valid method signatures:
`(Object)`
### Signature: `(Object)`
Valid return types:
`void`
Set the property value of an element. The argument can be any class accepted by the underlying graph.
example:
```
java
@Property
(
"Foo"
)
void
setFoobar
(
Bar
foobar
);
```
```
java
@Property
(
"Foo"
)
<
E
extends
Bar
>
void
setFoobar
(
E
foobar
);
```
```
java
@Property
(
"Foo"
)
<
E
extends
VectorFrame
>
void
setFoobar
(
E
foobar
);
```
```
java
@Property
(
"Foo"
)
void
setFoobar
(
Bar
foobar
);
```
```
java
@Property
(
value
=
"Foo"
,
operation
=
Property
.
Operation
.
SET
)
void
applyFoobar
(
Bar
foobar
);
```
## REMOVE Operation
Valid method signatures:
`( )`
### Signature: `( )`
Valid return types:
`void`
Remove the property of an element.
example:
```
java
@Property
(
"Foo"
)
void
removeFoobar
();
```
```
java
@Property
(
value
=
"Foo"
,
operation
=
Property
.
Operation
.
REMOVE
)
void
removeFoobar
();
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment